You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/04/26 18:52:19 UTC

[GitHub] [incubator-pinot] jihaozh commented on a change in pull request #4168: [TE] Clean up anomalyTimelinesView for anomalies order than 90 days

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org