Skip to content

Commit ce07060

Browse files
authored
Remove role mapping block check (#114223)
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.
1 parent 436d4cc commit ce07060

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleMappingMetadata.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.elasticsearch.cluster.AbstractNamedDiffable;
1313
import org.elasticsearch.cluster.ClusterState;
1414
import org.elasticsearch.cluster.NamedDiff;
15-
import org.elasticsearch.cluster.block.ClusterBlockLevel;
1615
import org.elasticsearch.cluster.metadata.Metadata;
1716
import org.elasticsearch.common.collect.Iterators;
1817
import org.elasticsearch.common.io.stream.StreamInput;
@@ -58,7 +57,6 @@ public final class RoleMappingMetadata extends AbstractNamedDiffable<Metadata.Cu
5857
private static final RoleMappingMetadata EMPTY = new RoleMappingMetadata(Set.of());
5958

6059
public static RoleMappingMetadata getFromClusterState(ClusterState clusterState) {
61-
clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);
6260
return clusterState.metadata().custom(RoleMappingMetadata.TYPE, RoleMappingMetadata.EMPTY);
6361
}
6462

0 commit comments

Comments
 (0)