Skip to content

Commit 7750cf5

Browse files
authored
Remove default auto_expand_replicas of lookup indices (elastic#120073)
This change disables auto_expand_replicas on lookup indices to enhance the lookup join user experience. Users can, however, enable this setting at any time to optimize performance.
1 parent 7ddcfeb commit 7750cf5

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

rest-api-spec/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,6 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
8585
task.skipTest("search.vectors/110_knn_query_with_filter/PRE_FILTER: pre-filter across multiple aliases", "waiting for #118774 backport")
8686
task.skipTest("search.vectors/160_knn_query_missing_params/kNN search in a dis_max query - missing num_candidates", "waiting for #118774 backport")
8787
task.skipTest("search.highlight/30_max_analyzed_offset/Plain highlighter with max_analyzed_offset < 0 should FAIL", "semantics of test has changed")
88+
task.skipTest("indices.create/10_basic/Create lookup index", "default auto_expand_replicas was removed")
89+
task.skipTest("indices.create/10_basic/Create lookup index with one shard", "default auto_expand_replicas was removed")
8890
})

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
index: test_lookup
172172

173173
- match: { test_lookup.settings.index.number_of_shards: "1"}
174-
- match: { test_lookup.settings.index.auto_expand_replicas: "0-all"}
175174

176175
---
177176
"Create lookup index with one shard":
@@ -196,7 +195,6 @@
196195
index: test_lookup
197196

198197
- match: { test_lookup.settings.index.number_of_shards: "1"}
199-
- match: { test_lookup.settings.index.auto_expand_replicas: "0-all"}
200198

201199
---
202200
"Create lookup index with two shards":

server/src/internalClusterTest/java/org/elasticsearch/index/LookupIndexModeIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void testBasic() {
4949
assertAcked(client().admin().indices().execute(TransportCreateIndexAction.TYPE, createRequest));
5050
Settings settings = client().admin().indices().prepareGetSettings("hosts").get().getIndexToSettings().get("hosts");
5151
assertThat(settings.get("index.mode"), equalTo("lookup"));
52-
assertThat(settings.get("index.auto_expand_replicas"), equalTo("0-all"));
52+
assertNull(settings.get("index.auto_expand_replicas"));
5353
Map<String, String> allHosts = Map.of(
5454
"192.168.1.2",
5555
"Windows",
@@ -141,7 +141,6 @@ public void testResizeLookupIndex() {
141141
Settings settings = client().admin().indices().prepareGetSettings("lookup-2").get().getIndexToSettings().get("lookup-2");
142142
assertThat(settings.get("index.mode"), equalTo("lookup"));
143143
assertThat(settings.get("index.number_of_shards"), equalTo("1"));
144-
assertThat(settings.get("index.auto_expand_replicas"), equalTo("0-all"));
145144

146145
ResizeRequest split = new ResizeRequest("lookup-3", "lookup-1");
147146
split.setResizeType(ResizeType.SPLIT);

server/src/main/java/org/elasticsearch/index/IndexMode.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,10 +623,7 @@ public Settings getAdditionalIndexSettings(
623623
}
624624
}
625625
if (indexMode == LOOKUP) {
626-
return Settings.builder()
627-
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
628-
.put(IndexMetadata.SETTING_AUTO_EXPAND_REPLICAS, "0-all")
629-
.build();
626+
return Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).build();
630627
} else {
631628
return Settings.EMPTY;
632629
}

0 commit comments

Comments
 (0)