You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/04 23:59:31 UTC

[GitHub] [helix] kaisun2000 commented on a change in pull request #1066: Prevent parallel controller pipelines run causing two master replicas

kaisun2000 commented on a change in pull request #1066:
URL: https://github.com/apache/helix/pull/1066#discussion_r465394923



##########
File path: helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -757,9 +753,20 @@ private void handleEvent(ClusterEvent event, BaseControllerDataProvider dataProv
     }
     event.addAttribute(AttributeName.ControllerDataProvider.name(), dataProvider);
 
-    logger.info(String.format("START: Invoking %s controller pipeline for cluster %s event: %s  %s",
-        manager.getClusterName(), dataProvider.getPipelineName(), event.getEventType(),
-        event.getEventId()));
+    // If manager session changes, no need to run pipeline for the stale event.
+    Optional<String> eventSessionId = event.getAttribute(AttributeName.EVENT_SESSION.name());
+    String managerSessionId = manager.getSessionId();

Review comment:
       If I understand correctly, the sessionId here can still be stale. eventually, we need sessionaware write of zkclient used by ZkHelixManager to ensure correctness, right?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org