diff --git a/src/main/kotlin/com/amazon/opendistroforelasticsearch/indexstatemanagement/ManagedIndexCoordinator.kt b/src/main/kotlin/com/amazon/opendistroforelasticsearch/indexstatemanagement/ManagedIndexCoordinator.kt index 3ff04627d..c1fa61fb2 100644 --- a/src/main/kotlin/com/amazon/opendistroforelasticsearch/indexstatemanagement/ManagedIndexCoordinator.kt +++ b/src/main/kotlin/com/amazon/opendistroforelasticsearch/indexstatemanagement/ManagedIndexCoordinator.kt @@ -231,7 +231,7 @@ class ManagedIndexCoordinator( @OpenForTesting suspend fun sweepClusterChangedEvent(event: ClusterChangedEvent) { val indicesDeletedRequests = event.indicesDeleted() - .filter { event.previousState().metaData().index(it).getPolicyID() != null } + .filter { event.previousState().metaData().index(it)?.getPolicyID() != null } .map { deleteManagedIndexRequest(it.uuid) } /*