xiaohui-sun commented on a change in pull request #4565: [TE] Merger fix to 
consider anomalies generated earlier
URL: https://github.com/apache/incubator-pinot/pull/4565#discussion_r318223619
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/algorithm/MergeWrapper.java
 ##########
 @@ -204,7 +208,15 @@ private boolean isExistingAnomaly(MergedAnomalyResultDTO 
anomaly) {
         properties.putAll(anomaly.getProperties());
         parent.setProperties(properties);
         if (isExistingAnomaly(parent)) {
-          modifiedExistingIds.add(parent.getId());
+          modifiedExistingAnomalies.add(parent);
+        } else {
+          // merge existing anomaly to new anomaly, set id to new anomaly
+          //  parent (new) |-------------------|
+          //         anomaly (existing) |-------------|
+          if (isExistingAnomaly(anomaly)) {
+            parent.setId(anomaly.getId());
 
 Review comment:
   Maybe we should put it into retainedNewAnomalies.

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