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

Update validator for index.routing.allocation.total_primary_shards_per_node for index update requests. #17474

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

pandeydivyansh1803
Copy link
Contributor

Description

When attempting to update the index.routing.allocation.total_primary_shards_per_node setting for an existing index in a remote store enabled cluster, an error is encountered stating that this setting can only be used with remote store enabled clusters, despite the cluster actually being remote store enabled.
Changes in this PR, updates the validator for update index setting. The change aims to resolve bug identified in #17295

Related Issues

Resolves #17473

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.

Divyansh Pandey and others added 18 commits February 11, 2025 12:19
… index per node. Added relevant files for unit test and integration test.

Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
…MENT replication indices

Signed-off-by: Divyansh Pandey <[email protected]>
…mary shards per node settings only for remote store enabled cluster. Added relevant unit and integration tests.

Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
Signed-off-by: Divyansh Pandey <[email protected]>
…chFork

Merge main to sync changelog updates with local changes.
…et for cluster which is not remote store enabled

Signed-off-by: Divyansh Pandey <[email protected]>
…d relevant integration tests

Signed-off-by: Divyansh Pandey <[email protected]>
}

// Check if remote store is enabled
boolean isRemoteStoreEnabled = clusterService.state()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ideal, but I see why we needed to do this. Since index settings update is an infrequently invoked API, I think we can keep this here.

@sachinpkale I couldn't see a better way to check if remote store is enabled in this code block. Do you see a better way to do this here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know how this is handled in MetadataCreateIndexService?

Copy link
Contributor

✅ Gradle check result for 2f156cc: SUCCESS

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 21.42857% with 11 lines in your changes missing coverage. Please review.

Project coverage is 72.44%. Comparing base (0ffed5e) to head (2f156cc).

Files with missing lines Patch % Lines
...luster/metadata/MetadataUpdateSettingsService.java 21.42% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17474      +/-   ##
============================================
+ Coverage     72.42%   72.44%   +0.02%     
- Complexity    65611    65632      +21     
============================================
  Files          5304     5304              
  Lines        304743   304756      +13     
  Branches      44189    44191       +2     
============================================
+ Hits         220701   220792      +91     
+ Misses        65888    65865      -23     
+ Partials      18154    18099      -55     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working _No response_
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Remote store clusters: Unable to update index.routing.allocation.total_primary_shards_per_node setting
3 participants