mirror of https://github.com/apache/kafka.git
KAFKA-18805: add synchronized block for Consumer Heartbeat close (#18920)
add synchronized block for Consumer Heartbeat close. Reviewers: Luke Chen <showuon@gmail.com>
This commit is contained in:
parent
85c337af44
commit
d1db3d8e14
|
|
@ -1577,7 +1577,9 @@ public abstract class AbstractCoordinator implements Closeable {
|
|||
this.failed.set(new RuntimeException(e));
|
||||
} finally {
|
||||
log.debug("Heartbeat thread has closed");
|
||||
this.closed = true;
|
||||
synchronized (AbstractCoordinator.this) {
|
||||
this.closed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue