vincentchenjl commented on a change in pull request #4777: [TE] add event 
driven scheduler
URL: https://github.com/apache/incubator-pinot/pull/4777#discussion_r346128121
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datalayer/bao/jdbc/TaskManagerImpl.java
 ##########
 @@ -103,6 +123,7 @@ public boolean updateStatusAndWorkerId(Long workerId, Long 
id, Set<TaskStatus> p
     if (permittedOldStatus.contains(task.getStatus())) {
       task.setStatus(newStatus);
       task.setWorkerId(workerId);
+      task.setStartTime(System.currentTimeMillis());
 
 Review comment:
   Because this method is only used when workers pick up the task, we can 
update the start time within the same SQL statement. By doing so, we can ensure 
that all tasks picked up by workers have startTime and avoid additional DB call 
to update the start time.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to