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

Optimise clone operation for incremental full cluster snapshots #16296

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

ashking94
Copy link
Member

@ashking94 ashking94 commented Oct 12, 2024

Description

In this PR, we have improved the logic for snapshot clone operations for full cluster incremental snapshots. The overall logic stays the same. There is no existing coverage for the snapshot clone operation. At this point, it is going to be huge effort to write unit tests for this flow.

Related Issues

Resolves #16295

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.

Copy link
Contributor

✅ Gradle check result for e273223: SUCCESS

Copy link

codecov bot commented Oct 12, 2024

Codecov Report

Attention: Patch coverage is 80.55556% with 7 lines in your changes missing coverage. Please review.

Project coverage is 71.90%. Comparing base (20536ee) to head (0ae74f5).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ava/org/opensearch/snapshots/SnapshotsService.java 80.55% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16296      +/-   ##
============================================
- Coverage     72.00%   71.90%   -0.11%     
+ Complexity    64796    64748      -48     
============================================
  Files          5307     5307              
  Lines        302540   302548       +8     
  Branches      43708    43707       -1     
============================================
- Hits         217853   217548     -305     
- Misses        66801    67124     +323     
+ Partials      17886    17876      -10     

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

Signed-off-by: Ashish Singh <[email protected]>
Copy link
Contributor

✅ Gradle check result for eadc32d: SUCCESS

Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

Generally LGTM. One question.

@dbwiddis
Copy link
Member

One more question, does this need a CHANGELOG?

@ashking94
Copy link
Member Author

One more question, does this need a CHANGELOG?

Let me add this, the users may have stopped using clone or have never faced this issue due to lower volume of shards after this inadvertent bug. However, adding a change log may guide the user to explore and try this out.

Signed-off-by: Ashish Singh <[email protected]>
Copy link
Contributor

✅ Gradle check result for 0ae74f5: SUCCESS

@dbwiddis dbwiddis merged commit 2166b44 into opensearch-project:main Oct 14, 2024
38 checks passed
@dbwiddis dbwiddis added the backport 2.x Backport to 2.x branch label Oct 14, 2024
@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-16296-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2166b449d99e5afd9a8d943f7245de2f2635fe5c
# Push it to GitHub
git push --set-upstream origin backport/backport-16296-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-16296-to-2.x.

@ashking94
Copy link
Member Author

Auto backport failed, will create a manual backport.

ashking94 added a commit to ashking94/OpenSearch that referenced this pull request Oct 14, 2024
…search-project#16296)

* Optimise clone operation for incremental full cluster snapshots

Signed-off-by: Ashish Singh <[email protected]>

* Add UTs

Signed-off-by: Ashish Singh <[email protected]>

* Add CHANGELOG

Signed-off-by: Ashish Singh <[email protected]>

---------

Signed-off-by: Ashish Singh <[email protected]>
@ashking94
Copy link
Member Author

Manual backport - #16303

dbwiddis added a commit that referenced this pull request Oct 14, 2024
…) (#16303)

* Optimise clone operation for incremental full cluster snapshots



* Add UTs



* Add CHANGELOG



---------

Signed-off-by: Ashish Singh <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: Daniel Widdis <[email protected]>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 16, 2024
…search-project#16296)

* Optimise clone operation for incremental full cluster snapshots

Signed-off-by: Ashish Singh <[email protected]>

* Add UTs

Signed-off-by: Ashish Singh <[email protected]>

* Add CHANGELOG

Signed-off-by: Ashish Singh <[email protected]>

---------

Signed-off-by: Ashish Singh <[email protected]>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 17, 2024
…search-project#16296)

* Optimise clone operation for incremental full cluster snapshots

Signed-off-by: Ashish Singh <[email protected]>

* Add UTs

Signed-off-by: Ashish Singh <[email protected]>

* Add CHANGELOG

Signed-off-by: Ashish Singh <[email protected]>

---------

Signed-off-by: Ashish Singh <[email protected]>
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 enhancement Enhancement or improvement to existing feature or request skip-changelog Storage:Snapshots
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Optimise clone operation for incremental full cluster snapshots
3 participants