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

Allow changing number of replicas of searchable snapshot index #11317

Merged

Conversation

bugmakerrrrrr
Copy link
Contributor

@bugmakerrrrrr bugmakerrrrrr commented Nov 23, 2023

Description

#5907 uses a whitelist to control which settings of searchable snapshot can be changed, but index.number_of_shards is not on the list. I think it is necessary to allow user to change the number of replicas based on their cost or performance needs.

Related Issues

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

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

@bugmakerrrrrr
Copy link
Contributor Author

@andrross what do you think about this idea?

Copy link
Contributor

github-actions bot commented Nov 23, 2023

Compatibility status:

Checks if related components are compatible with change c28c3bc

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

✅ Gradle check result for e13e1b7: SUCCESS

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ed1c8b7) 71.34% compared to head (c28c3bc) 71.29%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11317      +/-   ##
============================================
- Coverage     71.34%   71.29%   -0.05%     
- Complexity    58964    58983      +19     
============================================
  Files          4890     4890              
  Lines        277477   277477              
  Branches      40308    40308              
============================================
- Hits         197961   197838     -123     
- Misses        62976    63230     +254     
+ Partials      16540    16409     -131     

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

Copy link
Member

@andrross andrross left a comment

Choose a reason for hiding this comment

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

Thanks @bugmakerrrrrr! This is definitely a gap as configuring replicas is something that should be allowed.

@andrross
Copy link
Member

Thanks @bugmakerrrrrr. This change looks good. Can you please add an entry to the changelog under [Unreleased 2.x]?

Signed-off-by: panguixin <panguixin@bytedance.com>
Signed-off-by: panguixin <panguixin@bytedance.com>
@bugmakerrrrrr
Copy link
Contributor Author

@andrross Done. Btw, I find that allow changing allocation filter settings (index.routing.allocation.include/exclude/require.*) of searchable snapshot may also be necessary. Can I add support for it in this PR? or should I open a new PR?

Copy link
Contributor

❕ Gradle check result for b4fd24b: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=pit/10_basic/Delete all}

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
Contributor

❕ Gradle check result for c28c3bc: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=pit/10_basic/Delete all}

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

@andrross andrross added the backport 2.x Backport to 2.x branch label Nov 28, 2023
@andrross andrross merged commit c4e703f into opensearch-project:main Nov 28, 2023
32 checks passed
@andrross
Copy link
Member

@andrross Done. Btw, I find that allow changing allocation filter settings (index.routing.allocation.include/exclude/require.*) of searchable snapshot may also be necessary. Can I add support for it in this PR? or should I open a new PR?

Let's do that in a separate PR. Feel free to open an issue to track it as well.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-11317-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c4e703f9e7c31e991a57f3719910fdc086120e93
# Push it to GitHub
git push --set-upstream origin backport/backport-11317-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-11317-to-2.x.

andrross pushed a commit to andrross/OpenSearch that referenced this pull request Nov 28, 2023
…earch-project#11317)

* Allow changing number of replicas of searchable snapshot index

Signed-off-by: panguixin <panguixin@bytedance.com>

* add change log

Signed-off-by: panguixin <panguixin@bytedance.com>

---------

Signed-off-by: panguixin <panguixin@bytedance.com>
(cherry picked from commit c4e703f)
Signed-off-by: Andrew Ross <andrross@amazon.com>
kotwanikunal pushed a commit that referenced this pull request Nov 29, 2023
… (#11376)

* Allow changing number of replicas of searchable snapshot index



* add change log



---------


(cherry picked from commit c4e703f)

Signed-off-by: panguixin <panguixin@bytedance.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: panguixin <panguixin@bytedance.com>
fahadshamiinsta pushed a commit to fahadshamiinsta/OpenSearch270 that referenced this pull request Dec 4, 2023
…earch-project#11317)

* Allow changing number of replicas of searchable snapshot index

Signed-off-by: panguixin <panguixin@bytedance.com>

* add change log

Signed-off-by: panguixin <panguixin@bytedance.com>

---------

Signed-off-by: panguixin <panguixin@bytedance.com>
deshsidd pushed a commit to deshsidd/OpenSearch that referenced this pull request Dec 11, 2023
…earch-project#11317)

* Allow changing number of replicas of searchable snapshot index

Signed-off-by: panguixin <panguixin@bytedance.com>

* add change log

Signed-off-by: panguixin <panguixin@bytedance.com>

---------

Signed-off-by: panguixin <panguixin@bytedance.com>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…earch-project#11317)

* Allow changing number of replicas of searchable snapshot index

Signed-off-by: panguixin <panguixin@bytedance.com>

* add change log

Signed-off-by: panguixin <panguixin@bytedance.com>

---------

Signed-off-by: panguixin <panguixin@bytedance.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…earch-project#11317)

* Allow changing number of replicas of searchable snapshot index

Signed-off-by: panguixin <panguixin@bytedance.com>

* add change log

Signed-off-by: panguixin <panguixin@bytedance.com>

---------

Signed-off-by: panguixin <panguixin@bytedance.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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 backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants