ExpediaGroup / adaptive-alerting

Anomaly detection for streaming time series, featuring automated model selection.
Apache License 2.0
202 stars 49 forks source link

Bug fix/concurrent modification exception #753

Closed karanshah03 closed 4 years ago

karanshah03 commented 4 years ago

Use ConcurrentLinkedQueue to maintain the UUIDs for which lastAccessedTime needs to be updated and convert it into a HashSet before calling the elastic search to prevent duplicate calls.

Unique Detector UUIDs

2020-06-04 12:38:09 INFO  DetectorManager:296 () - Detectors last used time queue size 50
2020-06-04 12:38:09 INFO  DetectorManager:299 () - Updating last used time for a total of 50 invoked detectors
2020-06-04 12:38:09 INFO  DetectorManager:325 () - Updated last used time for a total of 50 invoked detectors

Duplicate Detector UUIDs

2020-06-04 12:38:09 INFO  DetectorManager:296 () - Detectors last used time queue size 4
2020-06-04 12:38:09 INFO  DetectorManager:299 () - Updating last used time for a total of 1 invoked detectors
2020-06-04 12:38:09 INFO  DetectorManager:325 () - Updated last used time for a total of 1 invoked detectors

Invalid Detector UUIDs

2020-06-04 12:38:09 INFO  DetectorManager:296 () - Detectors last used time queue size 2
2020-06-04 12:38:09 INFO  DetectorManager:299 () - Updating last used time for a total of 2 invoked detectors
2020-06-04 12:38:09 ERROR DetectorManager:321 () - Error updating last accessed time for detector UUID: ab5fea71-094d-48a7-9b25-caf6a7715704
2020-06-04 12:38:09 INFO  DetectorManager:325 () - Updated last used time for a total of 1 invoked detectors
codecov[bot] commented 4 years ago

Codecov Report

Merging #753 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #753      +/-   ##
==========================================
+ Coverage   88.39%   88.40%   +0.01%     
==========================================
  Files         168      168              
  Lines        3438     3442       +4     
  Branches      240      241       +1     
==========================================
+ Hits         3039     3043       +4     
  Misses        319      319              
  Partials       80       80              
Impacted Files Coverage Δ
...a/adaptivealerting/anomdetect/DetectorManager.java 87.80% <100.00%> (+0.40%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bf889b4...dabf74a. Read the comment docs.