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] Optimize segments metadata upload #7905

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

ashking94
Copy link
Member

Description

Currently in afterRefresh method of RemoteStoreRefreshListener, we upload metadata file even if the local and remote store has not difference in segment files. We need to skip the upload if there are no differences in segment files on local and remote store. With this PR, we are not creating / uploading the metadata file if there are no differences in the segments files in local primary store and remote store.

Related Issues

Resolves #7443

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchShardTaskCancellationWithHighCpu

Copy link
Collaborator

@gbbafna gbbafna left a comment

Choose a reason for hiding this comment

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

What are the chances of hitting this problem ? can we use didRefresh to find out if we need to trigger syncSegments at all ?

@ashking94
Copy link
Member Author

What are the chances of hitting this problem ? can we use didRefresh to find out if we need to trigger syncSegments at all ?

Currently I have been able to reproduce this for flush. Seeing if there are more cases when this can happen. Yes, I think we can use didRefresh for triggering syncSegments. We should trigger only if didRefresh is true.

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@ashking94 ashking94 reopened this Jun 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchShardTaskCancellationWithHighCpu

@ashking94
Copy link
Member Author

ashking94 commented Jun 6, 2023

Post merge main branch build failed. Created issue - #7931

@ashking94 ashking94 added the backport 2.x Backport to 2.x branch label Jun 6, 2023
@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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7905-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e135e1e3e42f806899ce6b17a96cd5bdf98cc08d
# Push it to GitHub
git push --set-upstream origin backport/backport-7905-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

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

sandeshkr419 pushed a commit to sandeshkr419/OpenSearch that referenced this pull request Jun 8, 2023
ashking94 added a commit to ashking94/OpenSearch that referenced this pull request Jul 3, 2023
…7905)

Signed-off-by: Ashish Singh <ssashish@amazon.com>
ashking94 added a commit to ashking94/OpenSearch that referenced this pull request Jul 4, 2023
…7905)

Signed-off-by: Ashish Singh <ssashish@amazon.com>
sachinpkale pushed a commit that referenced this pull request Jul 4, 2023
Signed-off-by: Ashish Singh <ssashish@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…7905)

Signed-off-by: Ashish Singh <ssashish@amazon.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 skip-changelog Storage:Durability Issues and PRs related to the durability framework v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remote Segments] Avoid segments metadata upload if no difference in local store and remote store
3 participants