Skip to content

Commit 4a8afc0

Browse files
committed
Add a cluster block that allows to delete indices that are read-only (#24678)
Today when an index is `read-only` the index is also blocked from being deleted which sometimes is undesired since in-order to make changes to a cluster indices must be deleted to free up space. This is a likely scenario in a hosted environment when disk-space is limited to switch indices read-only but allow deletions to free up space.
1 parent 89bd168 commit 4a8afc0

File tree

43 files changed

+268
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+268
-114
lines changed

core/src/main/java/org/elasticsearch/action/admin/cluster/settings/SettingsUpdater.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,20 @@ synchronized ClusterState updateSettings(final ClusterState currentState, Settin
6767
.transientSettings(transientSettings.build());
6868

6969
ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());
70-
boolean updatedReadOnly = MetaData.SETTING_READ_ONLY_SETTING.get(metaData.persistentSettings()) || MetaData.SETTING_READ_ONLY_SETTING.get(metaData.transientSettings());
70+
boolean updatedReadOnly = MetaData.SETTING_READ_ONLY_SETTING.get(metaData.persistentSettings())
71+
|| MetaData.SETTING_READ_ONLY_SETTING.get(metaData.transientSettings());
7172
if (updatedReadOnly) {
7273
blocks.addGlobalBlock(MetaData.CLUSTER_READ_ONLY_BLOCK);
7374
} else {
7475
blocks.removeGlobalBlock(MetaData.CLUSTER_READ_ONLY_BLOCK);
7576
}
77+
boolean updatedReadOnlyAllowDelete = MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.get(metaData.persistentSettings())
78+
|| MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.get(metaData.transientSettings());
79+
if (updatedReadOnlyAllowDelete) {
80+
blocks.addGlobalBlock(MetaData.CLUSTER_READ_ONLY_ALLOW_DELETE_BLOCK);
81+
} else {
82+
blocks.removeGlobalBlock(MetaData.CLUSTER_READ_ONLY_ALLOW_DELETE_BLOCK);
83+
}
7684
ClusterState build = builder(currentState).metaData(metaData).blocks(blocks).build();
7785
Settings settings = build.metaData().settings();
7886
// now we try to apply things and if they are invalid we fail

core/src/main/java/org/elasticsearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ protected String executor() {
6767
@Override
6868
protected ClusterBlockException checkBlock(ClusterUpdateSettingsRequest request, ClusterState state) {
6969
// allow for dedicated changes to the metadata blocks, so we don't block those to allow to "re-enable" it
70-
if ((request.transientSettings().isEmpty() &&
71-
request.persistentSettings().size() == 1 &&
72-
MetaData.SETTING_READ_ONLY_SETTING.exists(request.persistentSettings())) ||
73-
(request.persistentSettings().isEmpty() && request.transientSettings().size() == 1 &&
74-
MetaData.SETTING_READ_ONLY_SETTING.exists(request.transientSettings()))) {
75-
return null;
70+
if (request.transientSettings().size() + request.persistentSettings().size() == 1) {
71+
// only one setting
72+
if (MetaData.SETTING_READ_ONLY_SETTING.exists(request.persistentSettings())
73+
|| MetaData.SETTING_READ_ONLY_SETTING.exists(request.transientSettings())
74+
|| MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.transientSettings())
75+
|| MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.persistentSettings())) {
76+
// one of the settings above as the only setting in the request means - resetting the block!
77+
return null;
78+
}
7679
}
7780
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
7881
}

core/src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected void doExecute(Task task, DeleteIndexRequest request, ActionListener<D
7878

7979
@Override
8080
protected ClusterBlockException checkBlock(DeleteIndexRequest request, ClusterState state) {
81-
return state.blocks().indicesBlockedException(ClusterBlockLevel.METADATA_WRITE, indexNameExpressionResolver.concreteIndexNames(state, request));
81+
return state.blocks().indicesAllowReleaseResources(indexNameExpressionResolver.concreteIndexNames(state, request));
8282
}
8383

8484
@Override

core/src/main/java/org/elasticsearch/action/admin/indices/settings/put/TransportUpdateSettingsAction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ protected ClusterBlockException checkBlock(UpdateSettingsRequest request, Cluste
6565
if (globalBlock != null) {
6666
return globalBlock;
6767
}
68-
if (request.settings().size() == 1 && IndexMetaData.INDEX_BLOCKS_METADATA_SETTING.exists(request.settings()) || IndexMetaData.INDEX_READ_ONLY_SETTING.exists(request.settings())) {
68+
if (request.settings().size() == 1 && // we have to allow resetting these settings otherwise users can't unblock an index
69+
IndexMetaData.INDEX_BLOCKS_METADATA_SETTING.exists(request.settings())
70+
|| IndexMetaData.INDEX_READ_ONLY_SETTING.exists(request.settings())
71+
|| IndexMetaData.INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING.exists(request.settings())) {
6972
return null;
7073
}
7174
return state.blocks().indicesBlockedException(ClusterBlockLevel.METADATA_WRITE, indexNameExpressionResolver.concreteIndexNames(state, request));

core/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.elasticsearch.cluster.block;
2121

22+
import org.elasticsearch.Version;
2223
import org.elasticsearch.common.io.stream.StreamInput;
2324
import org.elasticsearch.common.io.stream.StreamOutput;
2425
import org.elasticsearch.common.io.stream.Streamable;
@@ -46,18 +47,22 @@ public class ClusterBlock implements Streamable, ToXContent {
4647

4748
private boolean disableStatePersistence = false;
4849

50+
private boolean allowReleaseResources;
51+
4952
private RestStatus status;
5053

5154
ClusterBlock() {
5255
}
5356

54-
public ClusterBlock(int id, String description, boolean retryable, boolean disableStatePersistence, RestStatus status, EnumSet<ClusterBlockLevel> levels) {
57+
public ClusterBlock(int id, String description, boolean retryable, boolean disableStatePersistence, boolean allowReleaseResources, RestStatus status,
58+
EnumSet<ClusterBlockLevel> levels) {
5559
this.id = id;
5660
this.description = description;
5761
this.retryable = retryable;
5862
this.disableStatePersistence = disableStatePersistence;
5963
this.status = status;
6064
this.levels = levels;
65+
this.allowReleaseResources = allowReleaseResources;
6166
}
6267

6368
public int id() {
@@ -130,12 +135,17 @@ public void readFrom(StreamInput in) throws IOException {
130135
final int len = in.readVInt();
131136
ArrayList<ClusterBlockLevel> levels = new ArrayList<>(len);
132137
for (int i = 0; i < len; i++) {
133-
levels.add(ClusterBlockLevel.fromId(in.readVInt()));
138+
levels.add(in.readEnum(ClusterBlockLevel.class));
134139
}
135140
this.levels = EnumSet.copyOf(levels);
136141
retryable = in.readBoolean();
137142
disableStatePersistence = in.readBoolean();
138143
status = RestStatus.readFrom(in);
144+
if (in.getVersion().onOrAfter(Version.V_5_5_0_UNRELEASED)) {
145+
allowReleaseResources = in.readBoolean();
146+
} else {
147+
allowReleaseResources = false;
148+
}
139149
}
140150

141151
@Override
@@ -144,11 +154,14 @@ public void writeTo(StreamOutput out) throws IOException {
144154
out.writeString(description);
145155
out.writeVInt(levels.size());
146156
for (ClusterBlockLevel level : levels) {
147-
out.writeVInt(level.id());
157+
out.writeEnum(level);
148158
}
149159
out.writeBoolean(retryable);
150160
out.writeBoolean(disableStatePersistence);
151161
RestStatus.writeTo(out, status);
162+
if (out.getVersion().onOrAfter(Version.V_5_5_0_UNRELEASED)) {
163+
out.writeBoolean(allowReleaseResources);
164+
}
152165
}
153166

154167
@Override
@@ -179,4 +192,8 @@ public boolean equals(Object o) {
179192
public int hashCode() {
180193
return id;
181194
}
195+
196+
public boolean isAllowReleaseResources() {
197+
return allowReleaseResources;
198+
}
182199
}

core/src/main/java/org/elasticsearch/cluster/block/ClusterBlockLevel.java

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,11 @@
2626
*
2727
*/
2828
public enum ClusterBlockLevel {
29-
READ(0),
30-
WRITE(1),
31-
METADATA_READ(2),
32-
METADATA_WRITE(3);
29+
READ,
30+
WRITE,
31+
METADATA_READ,
32+
METADATA_WRITE;
3333

34-
public static final EnumSet<ClusterBlockLevel> ALL = EnumSet.of(READ, WRITE, METADATA_READ, METADATA_WRITE);
34+
public static final EnumSet<ClusterBlockLevel> ALL = EnumSet.allOf(ClusterBlockLevel.class);
3535
public static final EnumSet<ClusterBlockLevel> READ_WRITE = EnumSet.of(READ, WRITE);
36-
37-
private final int id;
38-
39-
ClusterBlockLevel(int id) {
40-
this.id = id;
41-
}
42-
43-
public int id() {
44-
return this.id;
45-
}
46-
47-
static ClusterBlockLevel fromId(int id) {
48-
if (id == 0) {
49-
return READ;
50-
} else if (id == 1) {
51-
return WRITE;
52-
} else if (id == 2) {
53-
return METADATA_READ;
54-
} else if (id == 3) {
55-
return METADATA_WRITE;
56-
}
57-
throw new IllegalArgumentException("No cluster block level matching [" + id + "]");
58-
}
5936
}

core/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ public ImmutableOpenMap<String, Set<ClusterBlock>> indices() {
7070
}
7171

7272
public Set<ClusterBlock> global(ClusterBlockLevel level) {
73-
return levelHolders[level.id()].global();
73+
return levelHolders[level.ordinal()].global();
7474
}
7575

7676
public ImmutableOpenMap<String, Set<ClusterBlock>> indices(ClusterBlockLevel level) {
77-
return levelHolders[level.id()].indices();
77+
return levelHolders[level.ordinal()].indices();
7878
}
7979

8080
private Set<ClusterBlock> blocksForIndex(ClusterBlockLevel level, String index) {
@@ -97,7 +97,7 @@ private static ImmutableLevelHolder[] generateLevelHolders(Set<ClusterBlock> glo
9797
.collect(toSet())));
9898
}
9999

100-
levelHolders[level.id()] = new ImmutableLevelHolder(newGlobal, indicesBuilder.build());
100+
levelHolders[level.ordinal()] = new ImmutableLevelHolder(newGlobal, indicesBuilder.build());
101101
}
102102
return levelHolders;
103103
}
@@ -203,6 +203,26 @@ public ClusterBlockException indicesBlockedException(ClusterBlockLevel level, St
203203
return new ClusterBlockException(unmodifiableSet(blocks.collect(toSet())));
204204
}
205205

206+
/**
207+
* Returns <code>true</code> iff non of the given have a {@link ClusterBlockLevel#METADATA_WRITE} in place where the
208+
* {@link ClusterBlock#isAllowReleaseResources()} returns <code>false</code>. This is used in places where resources will be released
209+
* like the deletion of an index to free up resources on nodes.
210+
* @param indices the indices to check
211+
*/
212+
public ClusterBlockException indicesAllowReleaseResources(String[] indices) {
213+
final Function<String, Stream<ClusterBlock>> blocksForIndexAtLevel = index ->
214+
blocksForIndex(ClusterBlockLevel.METADATA_WRITE, index).stream();
215+
Stream<ClusterBlock> blocks = concat(
216+
global(ClusterBlockLevel.METADATA_WRITE).stream(),
217+
Stream.of(indices).flatMap(blocksForIndexAtLevel)).filter(clusterBlock -> clusterBlock.isAllowReleaseResources() == false);
218+
Set<ClusterBlock> clusterBlocks = unmodifiableSet(blocks.collect(toSet()));
219+
if (clusterBlocks.isEmpty()) {
220+
return null;
221+
}
222+
return new ClusterBlockException(clusterBlocks);
223+
}
224+
225+
206226
@Override
207227
public String toString() {
208228
if (global.isEmpty() && indices().isEmpty()) {
@@ -270,8 +290,6 @@ public static Diff<ClusterBlocks> readDiffFrom(StreamInput in) throws IOExceptio
270290

271291
static class ImmutableLevelHolder {
272292

273-
static final ImmutableLevelHolder EMPTY = new ImmutableLevelHolder(emptySet(), ImmutableOpenMap.of());
274-
275293
private final Set<ClusterBlock> global;
276294
private final ImmutableOpenMap<String, Set<ClusterBlock>> indices;
277295

@@ -314,30 +332,31 @@ public Builder blocks(ClusterBlocks blocks) {
314332
}
315333

316334
public Builder addBlocks(IndexMetaData indexMetaData) {
335+
String indexName = indexMetaData.getIndex().getName();
317336
if (indexMetaData.getState() == IndexMetaData.State.CLOSE) {
318-
addIndexBlock(indexMetaData.getIndex().getName(), MetaDataIndexStateService.INDEX_CLOSED_BLOCK);
337+
addIndexBlock(indexName, MetaDataIndexStateService.INDEX_CLOSED_BLOCK);
319338
}
320339
if (IndexMetaData.INDEX_READ_ONLY_SETTING.get(indexMetaData.getSettings())) {
321-
addIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_READ_ONLY_BLOCK);
340+
addIndexBlock(indexName, IndexMetaData.INDEX_READ_ONLY_BLOCK);
322341
}
323342
if (IndexMetaData.INDEX_BLOCKS_READ_SETTING.get(indexMetaData.getSettings())) {
324-
addIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_READ_BLOCK);
343+
addIndexBlock(indexName, IndexMetaData.INDEX_READ_BLOCK);
325344
}
326345
if (IndexMetaData.INDEX_BLOCKS_WRITE_SETTING.get(indexMetaData.getSettings())) {
327-
addIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_WRITE_BLOCK);
346+
addIndexBlock(indexName, IndexMetaData.INDEX_WRITE_BLOCK);
328347
}
329348
if (IndexMetaData.INDEX_BLOCKS_METADATA_SETTING.get(indexMetaData.getSettings())) {
330-
addIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_METADATA_BLOCK);
349+
addIndexBlock(indexName, IndexMetaData.INDEX_METADATA_BLOCK);
350+
}
351+
if (IndexMetaData.INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING.get(indexMetaData.getSettings())) {
352+
addIndexBlock(indexName, IndexMetaData.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK);
331353
}
332354
return this;
333355
}
334356

335357
public Builder updateBlocks(IndexMetaData indexMetaData) {
336-
removeIndexBlock(indexMetaData.getIndex().getName(), MetaDataIndexStateService.INDEX_CLOSED_BLOCK);
337-
removeIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_READ_ONLY_BLOCK);
338-
removeIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_READ_BLOCK);
339-
removeIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_WRITE_BLOCK);
340-
removeIndexBlock(indexMetaData.getIndex().getName(), IndexMetaData.INDEX_METADATA_BLOCK);
358+
// let's remove all blocks for this index and add them back -- no need to remove all individual blocks....
359+
indices.remove(indexMetaData.getIndex().getName());
341360
return addBlocks(indexMetaData);
342361
}
343362

core/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ public static <T extends Custom> T lookupPrototypeSafe(String type) {
131131
return proto;
132132
}
133133

134-
public static final ClusterBlock INDEX_READ_ONLY_BLOCK = new ClusterBlock(5, "index read-only (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE, ClusterBlockLevel.METADATA_WRITE));
135-
public static final ClusterBlock INDEX_READ_BLOCK = new ClusterBlock(7, "index read (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.READ));
136-
public static final ClusterBlock INDEX_WRITE_BLOCK = new ClusterBlock(8, "index write (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE));
137-
public static final ClusterBlock INDEX_METADATA_BLOCK = new ClusterBlock(9, "index metadata (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.METADATA_READ));
134+
public static final ClusterBlock INDEX_READ_ONLY_BLOCK = new ClusterBlock(5, "index read-only (api)", false, false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE, ClusterBlockLevel.METADATA_WRITE));
135+
public static final ClusterBlock INDEX_READ_BLOCK = new ClusterBlock(7, "index read (api)", false, false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.READ));
136+
public static final ClusterBlock INDEX_WRITE_BLOCK = new ClusterBlock(8, "index write (api)", false, false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE));
137+
public static final ClusterBlock INDEX_METADATA_BLOCK = new ClusterBlock(9, "index metadata (api)", false, false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.METADATA_READ));
138+
public static final ClusterBlock INDEX_READ_ONLY_ALLOW_DELETE_BLOCK = new ClusterBlock(12, "index read-only / allow delete (api)", false, false, true, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.WRITE));
138139

139140
public enum State {
140141
OPEN((byte) 0),
@@ -219,6 +220,10 @@ static Setting<Integer> buildNumberOfShardsSetting() {
219220
public static final Setting<Boolean> INDEX_BLOCKS_METADATA_SETTING =
220221
Setting.boolSetting(SETTING_BLOCKS_METADATA, false, Property.Dynamic, Property.IndexScope);
221222

223+
public static final String SETTING_READ_ONLY_ALLOW_DELETE = "index.blocks.read_only_allow_delete";
224+
public static final Setting<Boolean> INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING =
225+
Setting.boolSetting(SETTING_READ_ONLY_ALLOW_DELETE, false, Property.Dynamic, Property.IndexScope);
226+
222227
public static final String SETTING_VERSION_CREATED = "index.version.created";
223228
public static final String SETTING_VERSION_CREATED_STRING = "index.version.created_string";
224229
public static final String SETTING_VERSION_UPGRADED = "index.version.upgraded";

core/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,14 @@ public interface Custom extends NamedDiffable<Custom>, ToXContent {
128128
public static final Setting<Boolean> SETTING_READ_ONLY_SETTING =
129129
Setting.boolSetting("cluster.blocks.read_only", false, Property.Dynamic, Property.NodeScope);
130130

131-
public static final ClusterBlock CLUSTER_READ_ONLY_BLOCK = new ClusterBlock(6, "cluster read-only (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE, ClusterBlockLevel.METADATA_WRITE));
131+
public static final ClusterBlock CLUSTER_READ_ONLY_BLOCK = new ClusterBlock(6, "cluster read-only (api)", false, false,
132+
false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE, ClusterBlockLevel.METADATA_WRITE));
133+
134+
public static final Setting<Boolean> SETTING_READ_ONLY_ALLOW_DELETE_SETTING =
135+
Setting.boolSetting("cluster.blocks.read_only_allow_delete", false, Property.Dynamic, Property.NodeScope);
136+
137+
public static final ClusterBlock CLUSTER_READ_ONLY_ALLOW_DELETE_BLOCK = new ClusterBlock(13, "cluster read-only / allow delete (api)",
138+
false, false, true, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE, ClusterBlockLevel.METADATA_WRITE));
132139

133140
public static final MetaData EMPTY_META_DATA = builder().build();
134141

core/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
*/
5555
public class MetaDataIndexStateService extends AbstractComponent {
5656

57-
public static final ClusterBlock INDEX_CLOSED_BLOCK = new ClusterBlock(4, "index closed", false, false, RestStatus.FORBIDDEN, ClusterBlockLevel.READ_WRITE);
57+
public static final ClusterBlock INDEX_CLOSED_BLOCK = new ClusterBlock(4, "index closed", false, false, false, RestStatus.FORBIDDEN, ClusterBlockLevel.READ_WRITE);
5858

5959
private final ClusterService clusterService;
6060

core/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ public ClusterState execute(ClusterState currentState) {
236236

237237
ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks());
238238
maybeUpdateClusterBlock(actualIndices, blocks, IndexMetaData.INDEX_READ_ONLY_BLOCK, IndexMetaData.INDEX_READ_ONLY_SETTING, openSettings);
239+
maybeUpdateClusterBlock(actualIndices, blocks, IndexMetaData.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK, IndexMetaData.INDEX_BLOCKS_READ_ONLY_ALLOW_DELETE_SETTING, openSettings);
239240
maybeUpdateClusterBlock(actualIndices, blocks, IndexMetaData.INDEX_METADATA_BLOCK, IndexMetaData.INDEX_BLOCKS_METADATA_SETTING, openSettings);
240241
maybeUpdateClusterBlock(actualIndices, blocks, IndexMetaData.INDEX_WRITE_BLOCK, IndexMetaData.INDEX_BLOCKS_WRITE_SETTING, openSettings);
241242
maybeUpdateClusterBlock(actualIndices, blocks, IndexMetaData.INDEX_READ_BLOCK, IndexMetaData.INDEX_BLOCKS_READ_SETTING, openSettings);

core/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public void apply(Settings value, Settings current, Settings previous) {
195195
IndicesTTLService.INDICES_TTL_INTERVAL_SETTING,
196196
MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING,
197197
MetaData.SETTING_READ_ONLY_SETTING,
198+
MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING,
198199
RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING,
199200
RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING,
200201
RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_NETWORK_SETTING,

0 commit comments

Comments
 (0)