You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/25 08:16:37 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #12184: PIP-45: Handle session events and invalidations from single thread

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



##########
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:
       Should we remove 'synchronized' ?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org