Skip to content

Commit

Permalink
Remove role mapping block check (#114223)
Browse files Browse the repository at this point in the history
This method is used in multiple contexts that may not all handle
cluster-block exceptions gracefully, esp. since some types of cluster
blocks are retryable. Removing this, and may follow up with handling the
cluster state block for the affected transport actions instead.
  • Loading branch information
n1v0lg authored Oct 8, 2024
1 parent 436d4cc commit ce07060
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.elasticsearch.cluster.AbstractNamedDiffable;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.NamedDiff;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.common.collect.Iterators;
import org.elasticsearch.common.io.stream.StreamInput;
Expand Down Expand Up @@ -58,7 +57,6 @@ public final class RoleMappingMetadata extends AbstractNamedDiffable<Metadata.Cu
private static final RoleMappingMetadata EMPTY = new RoleMappingMetadata(Set.of());

public static RoleMappingMetadata getFromClusterState(ClusterState clusterState) {
clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);
return clusterState.metadata().custom(RoleMappingMetadata.TYPE, RoleMappingMetadata.EMPTY);
}

Expand Down

0 comments on commit ce07060

Please sign in to comment.