jihaozh commented on a change in pull request #3866: [TE] detection - task
scheduler backoff fix
URL: https://github.com/apache/incubator-pinot/pull/3866#discussion_r259516948
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/alert/DetectionAlertJob.java
##########
@@ -61,6 +63,21 @@ public void execute(JobExecutionContext
jobExecutionContext) throws JobExecution
DetectionAlertTaskInfo taskInfo = new
DetectionAlertTaskInfo(detectionAlertConfigId);
+ // check if a task for this detection alerter is already scheduled
+ String jobName = String.format("%s_%d",
TaskConstants.TaskType.DETECTION_ALERT, detectionAlertConfigId);
+ List<TaskDTO> scheduledTasks = taskDAO.findByPredicate(Predicate.AND(
Review comment:
Yes. When it tries to catch up, the task takes longer to execute. Without
this backoff logic, lots of duplicated tasks will pill up, which exacerbate the
overloading issue.
----------------------------------------------------------------
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]