-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix get index settings API doesn't show number_of_routing_shards when…
… it was explicitly set on index creation (#16294) * Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation Signed-off-by: Gao Binlong <[email protected]> * Update skip version in rest yaml test file Signed-off-by: Gao Binlong <[email protected]> * Fix test failure Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 5941a7e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b771f78
commit c8ced34
Showing
5 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...rc/main/resources/rest-api-spec/test/indices.get_settings/40_number_of_routing_shards.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
setup: | ||
- do: | ||
indices.create: | ||
body: | ||
settings: | ||
index: | ||
number_of_routing_shards: 4 | ||
number_of_shards: 2 | ||
number_of_replicas: 1 | ||
index: test-index | ||
|
||
- do: | ||
indices.create: | ||
body: | ||
settings: | ||
index: | ||
number_of_shards: 2 | ||
number_of_replicas: 1 | ||
index: test-index1 | ||
|
||
--- | ||
Test retrieval of number_routing_shards settings: | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "introduced in 3.0.0" # TODO: change it to 2.18.0 after backport to 2.x branch | ||
- do: | ||
indices.get_settings: | ||
flat_settings: true | ||
index: test-index | ||
# show `index.number_of_routing_shards` if it was explicitly set when creating | ||
- match: | ||
test-index.settings.index\.number_of_routing_shards: "4" | ||
|
||
- do: | ||
indices.get_settings: | ||
flat_settings: true | ||
index: test-index1 | ||
# do not show `index.number_of_routing_shards` if it was not explicitly set when creating | ||
- match: | ||
test-index1.settings.index\.number_of_routing_shards: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters