snleee commented on a change in pull request #6094:
URL: https://github.com/apache/incubator-pinot/pull/6094#discussion_r501262602



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/generator/TaskGeneratorUtils.java
##########
@@ -68,4 +73,30 @@
     }
     return runningSegments;
   }
+
+  public static Map<String, List<String>> getScheduledSegmentsMap(@Nonnull 
String taskType,

Review comment:
       There's no side effect. We filter out segments that are already 
scheduled. So, if the task is completed right after we fetch the state from the 
helix, the segment will be available for scheduling on the next round. 
   
   ```
   Can this return segments that are no longer scheduled?
   ```
   I'm not quite sure what will this would improve?
   
   What we need to do is:
   
   1. fetch all the segments from the table
   2. filter out segments that are already scheduled for merge tasks




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to