cyy0714 commented on a change in pull request #3634: [TE] task - randomize 
execution order to increase parallel throughput
URL: https://github.com/apache/incubator-pinot/pull/3634#discussion_r244894256
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/task/TaskDriver.java
 ##########
 @@ -147,6 +149,9 @@ private TaskDTO acquireTask() {
       if (CollectionUtils.isNotEmpty(anomalyTasks)) {
         LOG.info("Thread {} : Found {} tasks in waiting state", 
Thread.currentThread().getId(), anomalyTasks.size());
 
+        // shuffle candidate tasks to avoid synchronized patterns across 
threads (and hosts)
+        Collections.shuffle(anomalyTasks);
 
 Review comment:
   will it change the order of replay tasks? If yes, then this part causes the 
incorrectness of replay. The replay task ordering affects the final replay 
result a lot.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to