jasonyanwenl commented on a change in pull request #5769:
URL: https://github.com/apache/incubator-pinot/pull/5769#discussion_r469606604



##########
File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/task/TaskDriver.java
##########
@@ -183,8 +192,11 @@ private TaskDTO acquireTask() {
       try {
         // randomize fetching head and tail to reduce synchronized patterns 
across threads (and hosts)
         boolean orderAscending = System.currentTimeMillis() % 2 == 0;
+
+        // find by task type to separate online task from a normal task
+        TaskType type = this.isOnline ? TaskType.DETECTION_ONLINE : 
TaskType.DETECTION;
         anomalyTasks = taskDAO
-            .findByStatusOrderByCreateTime(TaskStatus.WAITING, 
driverConfiguration.getTaskFetchSizeCap(),
+            .findByStatusAndTypeOrderByCreateTime(TaskStatus.WAITING, type, 
driverConfiguration.getTaskFetchSizeCap(),

Review comment:
       Thank you so much. Really sorry about this. This is an issue. I will 
send a PR soon today.




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