-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent resetting latest flag of real-time when starting historical analysis #1287
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1287 +/- ##
============================================
+ Coverage 71.83% 77.55% +5.72%
- Complexity 4898 5432 +534
============================================
Files 518 532 +14
Lines 22879 23263 +384
Branches 2245 2305 +60
============================================
+ Hits 16434 18041 +1607
+ Misses 5410 4169 -1241
- Partials 1035 1053 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
2d5aff9
to
b6503c3
Compare
…g historical analysis This PR addresses a bug where starting a historical analysis after a real-time analysis on the same detector caused the real-time task’s latest flag to be incorrectly reset to false by the historical run. The fix ensures that only the latest flags of the same analysis type are reset: * Real-time analysis will only reset the latest flag of previous real-time analyses. * Historical analysis will only reset the latest flag of previous historical analyses. This PR also updated recencyEmphasis to have a minimum value of 2, aligning with RCF requirements. Testing: - Added an integration test to reproduce the bug and verified the fix. Signed-off-by: Kaituo Li <kaituo@amazon.com>
* indicating that the model state was updated in previous intervals. | ||
* - The entity associated with the model state is present. | ||
* - The owning node for real-time processing of the entity, with the same local version, is present in the hash ring. | ||
* - The owning node for real-time processing matches the current local node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before we could have occasions where two nodes have the same model for the same entity, so two nodes at the same time will find if there is an anomaly on the interval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this mean we would write result twice or we handled it later to only be written once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would only write it once (not guaranteed) as here we only process imputation on a node the entity is mapped to.
…g historical analysis (#1287) This PR addresses a bug where starting a historical analysis after a real-time analysis on the same detector caused the real-time task’s latest flag to be incorrectly reset to false by the historical run. The fix ensures that only the latest flags of the same analysis type are reset: * Real-time analysis will only reset the latest flag of previous real-time analyses. * Historical analysis will only reset the latest flag of previous historical analyses. This PR also updated recencyEmphasis to have a minimum value of 2, aligning with RCF requirements. Testing: - Added an integration test to reproduce the bug and verified the fix. Signed-off-by: Kaituo Li <kaituo@amazon.com> (cherry picked from commit afd5da9) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…g historical analysis (#1287) (#1288) This PR addresses a bug where starting a historical analysis after a real-time analysis on the same detector caused the real-time task’s latest flag to be incorrectly reset to false by the historical run. The fix ensures that only the latest flags of the same analysis type are reset: * Real-time analysis will only reset the latest flag of previous real-time analyses. * Historical analysis will only reset the latest flag of previous historical analyses. This PR also updated recencyEmphasis to have a minimum value of 2, aligning with RCF requirements. Testing: - Added an integration test to reproduce the bug and verified the fix. (cherry picked from commit afd5da9) Signed-off-by: Kaituo Li <kaituo@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR addresses a bug where starting a historical analysis after a real-time analysis on the same detector caused the real-time task’s latest flag to be incorrectly reset to false by the historical run.
The fix ensures that only the latest flags of the same analysis type are reset:
Additional Changes:
Testing:
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.