Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
n1v0lg committed Nov 9, 2023
1 parent a9d0df3 commit d8ce2b4
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit d8ce2b4

Please sign in to comment.