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

Bugfix in snapshot V2 restore flow #16332

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

sachinpkale
Copy link
Member

@sachinpkale sachinpkale commented Oct 15, 2024

Description

  • If snapshot is created between last fetch of pinned timestamps and index deletion and last metadata file is created before the last fetch, the restore of snapshot will restore data corresponding to previous snapshot
  • Consider following set of events:
09:58 - second last metadata file
10:00 - S1
10:30 - last metadata file
10:55 - last refresh of pinned timestamp
11:00 - S2
11:05 - Index deleted
  • Here, restoring S2 will restore data corresponding to snapshot S1.
  • In this PR, we make sure to not delete latest metadata file if pinned timestamps are enabled.
  • When the last snapshot that has reference to the deleted index gets deleted, the remote data will be cleaned up.

Related Issues

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 b89a761: 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?

@sachinpkale sachinpkale force-pushed the snapshot-v2-restore-fix branch from 7ea04fb to 678c225 Compare October 15, 2024 13:47
Copy link
Contributor

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

@sachinpkale sachinpkale force-pushed the snapshot-v2-restore-fix branch from 678c225 to 261428a Compare October 15, 2024 17:03
@sachinpkale sachinpkale changed the title Snapshot v2 restore fix Bugfix in snapshot V2 restore flow Oct 15, 2024
@sachinpkale sachinpkale marked this pull request as ready for review October 15, 2024 17:30
Copy link
Contributor

✅ Gradle check result for 261428a: SUCCESS

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.98%. Comparing base (35c366d) to head (261428a).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...index/translog/RemoteFsTimestampAwareTranslog.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16332      +/-   ##
============================================
- Coverage     72.10%   71.98%   -0.13%     
+ Complexity    64862    64793      -69     
============================================
  Files          5307     5307              
  Lines        302606   302612       +6     
  Branches      43717    43719       +2     
============================================
- Hits         218208   217827     -381     
- Misses        66541    66939     +398     
+ Partials      17857    17846      -11     

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

@gbbafna gbbafna merged commit dd5a87a into opensearch-project:main Oct 16, 2024
65 of 67 checks passed
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Oct 16, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 16, 2024
Signed-off-by: Sachin Kale <[email protected]>
(cherry picked from commit dd5a87a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sachinpkale pushed a commit that referenced this pull request Oct 16, 2024
(cherry picked from commit dd5a87a)

Signed-off-by: Sachin Kale <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 16, 2024
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 17, 2024
sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Oct 19, 2024
sachinpkale added a commit to sachinpkale/OpenSearch that referenced this pull request Oct 20, 2024
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 21, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants