You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2019/01/03 00:53:13 UTC

[GitHub] apucher commented on a change in pull request #3634: [TE] task - randomize execution order to increase parallel throughput

apucher 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_r244895106
 
 

 ##########
 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:
   the order already isn't deterministic (multiple threads, head-tail fetching at random). So this doesn't change the guarantees or semantics of task execution

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org