junkaixue commented on code in PR #2977:
URL: https://github.com/apache/helix/pull/2977#discussion_r1874575288


##########
helix-core/src/main/java/org/apache/helix/controller/pipeline/AbstractBaseStage.java:
##########
@@ -64,9 +65,9 @@ public String getStageName() {
     return className;
   }
 
-  public static <T> Future asyncExecute(ExecutorService service, Callable<T> 
task) {
+  public static <T> Future<T> asyncExecute(ExecutorService service, 
Callable<T> task) {

Review Comment:
   Why to change this?



##########
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java:
##########
@@ -235,7 +235,9 @@ public static GenericHelixController 
getLeaderController(String clusterName) {
     if (clusterName != null) {
       ImmutableSet<GenericHelixController> controllers = 
_helixControllerFactory.get(clusterName);
       if (controllers != null) {
-        return controllers.stream().filter(controller -> 
controller._helixManager.isLeader())
+        return controllers.stream()
+            .filter(controller -> controller._helixManager != null)
+            .filter(controller -> controller._helixManager.isLeader())
             .findAny().orElse(null);

Review Comment:
   Are you sure using Helix format???



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to