diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/ReservedRoleMappingAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/ReservedRoleMappingAction.java index 12eb17dcc2fdd..852887767578f 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/ReservedRoleMappingAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/rolemapping/ReservedRoleMappingAction.java @@ -8,7 +8,6 @@ package org.elasticsearch.xpack.security.action.rolemapping; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.GroupedActionListener; import org.elasticsearch.common.util.concurrent.ListenableFuture; import org.elasticsearch.reservedstate.NonStateTransformResult; @@ -127,16 +126,12 @@ public void onFailure(Exception e) { }); for (var request : requests) { - // Avoid waiting for search shards since the security index may still be bootstrapping - request.setActiveShardCount(ActiveShardCount.NONE); roleMappingStore.putRoleMapping(request, taskListener); } for (var mappingToDelete : toDelete) { var deleteRequest = new DeleteRoleMappingRequest(); deleteRequest.setName(mappingToDelete); - // Avoid waiting for search shards since the security index may still be bootstrapping - deleteRequest.setActiveShardCount(ActiveShardCount.NONE); roleMappingStore.deleteRoleMapping(deleteRequest, taskListener); } }