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

Updated the validation for search only replica settings #17093

Merged

Conversation

vinaykpud
Copy link
Contributor

Description

In this PR we are updating a validation check when there is search replica settings exist in the indexSettings. indexSettings gets created based on the request settings and template settings. So updating this part of the code actually enables index templates to configure search replicas

Related Issues

Resolves #17033
Related #15306

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.

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Performance labels Jan 22, 2025
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❕ Gradle check result for f91ad85: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (faabd10) to head (cd9c6bc).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...h/cluster/metadata/MetadataCreateIndexService.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17093      +/-   ##
============================================
+ Coverage     72.36%   72.42%   +0.06%     
- Complexity    65733    65800      +67     
============================================
  Files          5318     5318              
  Lines        305674   305673       -1     
  Branches      44349    44349              
============================================
+ Hits         221197   221391     +194     
+ Misses        66341    66172     -169     
+ Partials      18136    18110      -26     

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

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

❌ Gradle check result for 5ffbe1e: 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: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 3, 2025

✅ Gradle check result for 120731b: SUCCESS

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 4, 2025

❕ Gradle check result for cd9c6bc: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testSnapshotWithLargeSegmentFiles
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testSnapshotAndRestore
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testRequestStats
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testReadRange
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testReadNonExistingPath
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testMultipleSnapshotAndRollback
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testList
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testDeleteBlobs
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testContainerCreationAndDeletion
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@mch2 mch2 merged commit 865704b into opensearch-project:main Feb 4, 2025
33 of 34 checks passed
@cwperks
Copy link
Member

cwperks commented Feb 18, 2025

@mch2 @vinaykpud @mgodwan Does this PR relate to the flakiness seen in MetadataCreateIndexService tests? #17291

throw new IllegalArgumentException(
"To set " + SETTING_NUMBER_OF_SEARCH_REPLICAS + ", " + SETTING_REMOTE_STORE_ENABLED + " must be set to true"
);
}
builder.put(SETTING_NUMBER_OF_SEARCH_REPLICAS, INDEX_NUMBER_OF_SEARCH_REPLICAS_SETTING.get(requestSettings));
Copy link
Member

Choose a reason for hiding this comment

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

naive question as I'm not familiar with this code. This looks like a functional change to not set this on the builder anymore. Why is this not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even though it looks like we removed something, keeping this statement actually sets SETTING_NUMBER_OF_SEARCH_REPLICAS to 0.
I'll check the tests and failures to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search:Performance skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Support index templates to configure search replicas
3 participants