jihaozh commented on a change in pull request #4621: [TE] fix the last time stamp filter out the generated anomalies URL: https://github.com/apache/incubator-pinot/pull/4621#discussion_r325931369
########## File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionResource.java ########## @@ -476,7 +477,11 @@ public Response detectionReplay( } for (MergedAnomalyResultDTO anomaly : result.getAnomalies()) { - anomaly.setAnomalyResultSource(AnomalyResultSource.ANOMALY_REPLAY); + // if would like to skip sending the alert emails, the anomalies should be marked with REPLAY + // otherwise, should be left as the default source + if (!sendEmail) { + anomaly.setAnomalyResultSource(AnomalyResultSource.ANOMALY_REPLAY); Review comment: If the source set to ANOMALY_REPLAY, the alerter will skip sending it. Actually, that's the only place this flag is used in the system. If that's not set, the alerter can pick up the anomaly and sent it out. I think we should have an option to send the anomalies generated by replay. This is useful when the system missed an anomaly but the email is still important for the customer. ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org