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_r244895822
##########
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:
I see. I also figure out it doesn't affects the execution order. But if the
execution order isn't deterministic, how can we promise the replay result is
the same as the result they see via scheduled tasks?
----------------------------------------------------------------
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]