lhotari commented on code in PR #23995:
URL: https://github.com/apache/pulsar/pull/23995#discussion_r1959665979
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/LeaderElectionImpl.java:
##########
@@ -113,6 +116,11 @@ private synchronized
CompletableFuture<LeaderElectionState> elect() {
return tryToBecomeLeader();
}
}).thenCompose(leaderElectionState -> {
+ synchronized (this) {
+ if (internalState == InternalState.Closed) {
Review Comment:
Already covered with `synchronized (this)`. `this` points to
`LeaderElectionImpl` instance here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]