-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport 2.x] Fix get index settings API doesn't show number_of_rout…
…ing_shards when it was explicitly set on index creation (#16453) * 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 <gbinlong@amazon.com> * Update skip version in rest yaml test file Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Fix test failure Signed-off-by: Gao Binlong <gbinlong@amazon.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> (cherry picked from commit 5941a7e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update 40_number_of_routing_shards.yml Signed-off-by: Andriy Redko <andriy.redko@aiven.io> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
- Loading branch information
1 parent
d27ee4e
commit d919fc5
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.18.99" | ||
reason: "introduced in 2.19.0" | ||
- 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