Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation #16294

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

gaobinlong
Copy link
Collaborator

@gaobinlong gaobinlong commented Oct 12, 2024

Description

If the index level setting index.number_of_routing_shards is set explicitly at the index creation time, we don't show the setting in the response of get settings API, and we can only get the value by GET _cluster/state, this PR makes that setting shown in the response of the get settings API when it's explicitly set.

Related Issues

#14199

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

… it was explicitly set on index creation

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
@gaobinlong
Copy link
Collaborator Author

@r1walz @Bukhtawar could you help to review this PR? Thanks!

dbwiddis
dbwiddis previously approved these changes Oct 12, 2024
Copy link
Contributor

❌ Gradle check result for 7eaef9c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

❌ Gradle check result for 0f6f4e5: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

✅ Gradle check result for a981af4: SUCCESS

Copy link

codecov bot commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.98%. Comparing base (9ddee61) to head (69fa5c6).
Report is 43 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16294      +/-   ##
============================================
- Coverage     72.03%   71.98%   -0.05%     
- Complexity    64782    64810      +28     
============================================
  Files          5307     5307              
  Lines        302545   302542       -3     
  Branches      43703    43703              
============================================
- Hits         217925   217778     -147     
- Misses        66712    66914     +202     
+ Partials      17908    17850      -58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

✅ Gradle check result for 69fa5c6: SUCCESS

@gaobinlong
Copy link
Collaborator Author

@reta, could you help to take a second look at this PR? Thanks! This change doesn't target for 2.18.0.

@reta reta merged commit 5941a7e into opensearch-project:main Oct 23, 2024
37 of 38 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 23, 2024
… 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>
reta added a commit that referenced this pull request Oct 23, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants