Skip to content

Commit 76dca02

Browse files
authored
Merge branch 'main' into Fix_range_handling_zero_length_blob
2 parents b1f192b + bb76210 commit 76dca02

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

docs/changelog/126077.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 126077
2+
summary: Preventing `ConcurrentModificationException` when updating settings for more
3+
than one index
4+
area: Indices APIs
5+
type: bug
6+
issues: []

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ tests:
395395
- class: org.elasticsearch.xpack.security.authz.RBACEngineTests
396396
method: testGetRoleDescriptorsIntersectionForRemoteClusterHasDeterministicOrderForIndicesPrivileges
397397
issue: https://github.com/elastic/elasticsearch/issues/126061
398+
- class: org.elasticsearch.search.CCSDuelIT
399+
method: testTerminateAfter
400+
issue: https://github.com/elastic/elasticsearch/issues/126085
398401

399402
# Examples:
400403
#

server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsServiceIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public void testThatNonDynamicSettingChangesTakeEffect() throws Exception {
3939
* This test makes sure that when non-dynamic settings are updated that they actually take effect (as opposed to just being set
4040
* in the cluster state).
4141
*/
42-
createIndex("test", Settings.EMPTY);
42+
createIndex("test-1", Settings.EMPTY);
43+
createIndex("test-2", Settings.EMPTY);
4344
MetadataUpdateSettingsService metadataUpdateSettingsService = internalCluster().getCurrentMasterNodeInstance(
4445
MetadataUpdateSettingsService.class
4546
);

server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ ClusterState execute(ClusterState currentState) {
219219
// We have non-dynamic settings and open indices. We will unassign all of the shards in these indices so that the new
220220
// changed settings are applied when the shards are re-assigned.
221221
routingTableBuilder = RoutingTable.builder(allocationService.getShardRoutingRoleStrategy(), currentRoutingTable);
222-
for (Index index : openIndices) {
222+
for (Index index : new HashSet<>(openIndices)) {
223223
// We only want to take on the expense of reopening all shards for an index if the setting is really changing
224224
Settings existingSettings = currentProject.index(index).getSettings();
225225
boolean needToReopenIndex = false;

0 commit comments

Comments
 (0)