Skip to content

Commit

Permalink
Fix Duplicate Scheduling of Index Rollover in ADIndexManagement
Browse files Browse the repository at this point in the history
ADIndexManagement inherits from IndexManagement, which implements LocalNodeClusterManagerListener, causing it to listen for master node changes. This listener schedules index rollover and deletion. However, ADIndexManagement was inadvertently listening to the cluster manager event again, leading to duplicate scheduling of these tasks.

This commit removes the redundant listener call in ADIndexManagement, ensuring that index rollover and deletion are scheduled only once per interval.

Testing:

Verified that index rollover and deletion now execute once per interval as expected.

Signed-off-by: Kaituo Li <[email protected]>
  • Loading branch information
kaituo committed Jun 10, 2024
1 parent 4d400e3 commit 40e9eec
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public ADIndexManagement(
AnomalyDetector::parse,
ADCommonName.CUSTOM_RESULT_INDEX_PREFIX + "*"
);
this.clusterService.addLocalNodeClusterManagerListener(this);

this.indexStates = new EnumMap<ADIndex, IndexState>(ADIndex.class);

Expand Down

0 comments on commit 40e9eec

Please sign in to comment.