Skip to content

Commit a81866f

Browse files
[Bug Fix] After remove policy from index, coordinator sweep will bind it again (#1525)
Co-authored-by: bowenlan-amzn <[email protected]>
1 parent a8c4ca7 commit a81866f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexCoordinator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ class ManagedIndexCoordinator(
337337
if (clusterState.metadata.hasIndex(indexName)) {
338338
val indexMetadata = clusterState.metadata.index(indexName)
339339
val autoManage =
340-
if (AUTO_MANAGE.get(indexMetadata.settings)) {
341-
true
342-
} else {
340+
if (indexMetadata.settings.get(AUTO_MANAGE.key).isNullOrBlank()) {
343341
LegacyOpenDistroManagedIndexSettings.AUTO_MANAGE.get(indexMetadata.settings)
342+
} else {
343+
AUTO_MANAGE.get(indexMetadata.settings)
344344
}
345345
if (autoManage) {
346346
val isHiddenIndex =

0 commit comments

Comments
 (0)