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

[Remote Store] Add support to disable flush based on translog reader count #14027

Merged

Conversation

shourya035
Copy link
Member

@shourya035 shourya035 commented Jun 6, 2024

Description

We introduced ability to run flush automatically based on the number of accumulated translog readers. With this PR, we are -1 as a permissible value for the setting cluster.remote_store.translog.max_readers which would disable this feature.

This is needed to prevent repeated flushes when a large number of translog files get accumulated, especially when a shard copy is relocating to another node and the active primary is getting large number of writes. This also helps during the remotestore migration when the remote seeding process ends up accumulating a lot of translog on the active primary which needs to be replayed after the seeding process is complete.

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.

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
@shourya035 shourya035 self-assigned this Jun 6, 2024
@shourya035 shourya035 added the backport 2.x Backport to 2.x branch label Jun 6, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

❌ Gradle check result for 5679151: 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?

Copy link
Contributor

github-actions bot commented Jun 6, 2024

✅ Gradle check result for 4d77837: SUCCESS

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 71.58%. Comparing base (b15cb0c) to head (4d77837).
Report is 355 commits behind head on main.

Current head 4d77837 differs from pull request most recent head 75e28a9

Please upload reports for the commit 75e28a9 to get more accurate results.

Files Patch % Lines
...rg/opensearch/index/translog/RemoteFsTranslog.java 25.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14027      +/-   ##
============================================
+ Coverage     71.42%   71.58%   +0.16%     
- Complexity    59978    61368    +1390     
============================================
  Files          4985     5071      +86     
  Lines        282275   288396    +6121     
  Branches      40946    41766     +820     
============================================
+ Hits         201603   206459    +4856     
- Misses        63999    64888     +889     
- Partials      16673    17049     +376     

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

Copy link
Contributor

@astute-decipher astute-decipher left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

@gbbafna gbbafna changed the title [Remote Store] Adding support to disable flush based on translog reader count [Remote Store] Add support to disable flush based on translog reader count Jun 6, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Jun 6, 2024

❕ Gradle check result for 75e28a9: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.gateway.RecoveryFromGatewayIT.testShardStoreFetchMultiNodeMultiIndexesUsingBatchAction

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

@gbbafna gbbafna merged commit b9ca5a8 into opensearch-project:main Jun 6, 2024
28 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-14027-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b9ca5a8e24673ed38cab736ffbd57479de241553
# Push it to GitHub
git push --set-upstream origin backport/backport-14027-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-14027-to-2.x.

shourya035 added a commit to shourya035/OpenSearch that referenced this pull request Jun 6, 2024
…count (opensearch-project#14027)

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
jed326 pushed a commit that referenced this pull request Jun 6, 2024
…count (#14027) (#14044)

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
…count (opensearch-project#14027)

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
kkewwei pushed a commit to kkewwei/OpenSearch that referenced this pull request Jul 24, 2024
…count (opensearch-project#14027) (opensearch-project#14044)

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Signed-off-by: kkewwei <kkewwei@163.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
…count (opensearch-project#14027)

Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.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.

3 participants