diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java index ec999b73e5334..69f1b392cfa50 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetadataUpdateSettingsService.java @@ -83,8 +83,10 @@ public MetadataUpdateSettingsService( builder.failure(task, e); } } - // reroute in case things change that require it (like number of replicas) - state = allocationService.reroute(state, "settings update"); + if (state != currentState) { + // reroute in case things change that require it (like number of replicas) + state = allocationService.reroute(state, "settings update"); + } return builder.build(state); }; }