merlimat commented on a change in pull request #12184:
URL: https://github.com/apache/pulsar/pull/12184#discussion_r716048218



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/LeaderElectionImpl.java
##########
@@ -269,15 +275,19 @@ public synchronized LeaderElectionState getState() {
     }
 
     private synchronized void handleSessionNotification(SessionEvent event) {
-        if (event == SessionEvent.SessionReestablished) {
-            if (leaderElectionState == LeaderElectionState.Leading) {
+        // Ensure we're only processing one session event at a time.
+        executor.execute(SafeRunnable.safeRun(() -> {

Review comment:
       Yes, it doesn't make sense anymore




-- 
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]


Reply via email to