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

introduce a setting to disable download of full cluster state from remote on term mismatch #16798

Merged

Conversation

rajiv-kv
Copy link
Contributor

@rajiv-kv rajiv-kv commented Dec 6, 2024

In clusters with large number of indices, fetch of full cluster-state would incur downloading too many files from remote. Further if cluster-state updates frequently, it would cause the remote threadpool to be occupied for downloading the state on term mismatch. This might prevent the cluster-state updates from cluster-manager to be propagated slowly and there-by causing the node to lag.

Description

Introduce a setting cluster.remote_state.download.serve_read_api.enabled to disable download of full cluster state from remote on term mismatch.

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.

Documentation PR :- opensearch-project/documentation-website#8957
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.

Copy link
Contributor

github-actions bot commented Dec 6, 2024

✅ Gradle check result for 4001b93: SUCCESS

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 72.05%. Comparing base (b67cdf4) to head (49cc2b5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...arch/gateway/remote/RemoteClusterStateService.java 50.00% 3 Missing ⚠️
...g/opensearch/cluster/coordination/Coordinator.java 33.33% 1 Missing and 1 partial ⚠️
...termanager/term/TransportGetTermVersionAction.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16798      +/-   ##
============================================
+ Coverage     72.03%   72.05%   +0.02%     
- Complexity    65230    65235       +5     
============================================
  Files          5318     5318              
  Lines        304051   304060       +9     
  Branches      43990    43991       +1     
============================================
+ Hits         219021   219093      +72     
+ Misses        67121    67021     -100     
- Partials      17909    17946      +37     

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

@shwetathareja
Copy link
Member

add changelog

@rajiv-kv rajiv-kv force-pushed the cluster_term_mismatch_setting branch from 4001b93 to 4e59b7c Compare December 12, 2024 11:04
Copy link
Contributor

❕ Gradle check result for 4e59b7c: 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
Contributor

✅ Gradle check result for bada1f7: SUCCESS

@rajiv-kv rajiv-kv force-pushed the cluster_term_mismatch_setting branch from bada1f7 to 49cc2b5 Compare December 13, 2024 10:10
Copy link
Contributor

✅ Gradle check result for 49cc2b5: SUCCESS

@shwetathareja shwetathareja merged commit e46d4bc into opensearch-project:main Dec 16, 2024
37 of 38 checks passed
@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-16798-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e46d4bc47423a6bcf61182dbc42cb5d68e5cb61b
# Push it to GitHub
git push --set-upstream origin backport/backport-16798-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-16798-to-2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants