jihaozh commented on a change in pull request #4168: [TE] Clean up 
anomalyTimelinesView for anomalies order than 90 days
URL: https://github.com/apache/incubator-pinot/pull/4168#discussion_r279065963
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/monitor/MonitorTaskRunner.java
 ##########
 @@ -108,6 +111,28 @@ private void executeMonitorUpdate(MonitorTaskInfo 
monitorTaskInfo) {
     }
   }
 
+  private int cleanUpMergedAnomalies(int cleanUpDays) {
+    DateTime cleanupStartDate = new 
DateTime().withTimeAtStartOfDay().minusDays(cleanUpDays);
+    DateTime cleanupEndDate = cleanupStartDate.plusDays(1);
 
 Review comment:
   Also, how often the monitoring job runs? If it's running daily and failing 
on someday, there might still be some anomalies left to be not cleaned. 
   
   Can we consider the following options?
   - Instead of plus 1 day, we can add some additional lookback to make it more 
robust.
   - Get the last successful monitoring job, and clean up from that time till 
the 90 days before.

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