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

avoids skipping validation checks for numberOfShards setting when buil… #9

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

parasjain1
Copy link

…ding IndexMetadata

With split changes, we've added SplitShardsMetadata. This object is instantiated in IndexMetadata.Builder' flow using the numberOfShards. We were invoking numberOfShards() which skips the validation check for the INDEX_NUMBER_OF_SHARDS_SETTING setting as it directly fetches the setting via settings.getAsInt().

Changing this to fetch this setting via INDEX_NUMBER_OF_SHARDS_SETTING.get(settings) so that validations work correctly.

Description

[Describe what this change achieves]

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

…ding IndexMetadata

With split changes, we've added SplitShardsMetadata. This object is instantiated in IndexMetadata.Builder' flow using the numberOfShards. We were invoking numberOfShards() which skips the validation check for the INDEX_NUMBER_OF_SHARDS_SETTING setting as it directly fetches the setting via `settings.getAsInt()`.

Changing this to fetch this setting via INDEX_NUMBER_OF_SHARDS_SETTING.get(settings) so that validations work correctly.

Signed-off-by: Paras Jain <[email protected]>
@parasjain1 parasjain1 requested a review from gbbafna as a code owner February 5, 2025 08:30
@vikasvb90 vikasvb90 merged commit e3d9714 into vikasvb90:split_final Feb 5, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants