-
Notifications
You must be signed in to change notification settings - Fork 2k
Treat last fetch timestamp of pinned timestamp as one of the pinned timestamps #16392
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
Treat last fetch timestamp of pinned timestamp as one of the pinned timestamps #16392
Conversation
❌ Gradle check result for 6d86b38: 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? |
6d86b38
to
257f2ec
Compare
…imestamps Signed-off-by: Sachin Kale <[email protected]>
257f2ec
to
7837786
Compare
❌ Gradle check result for 7837786: 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? |
❕ Gradle check result for 7837786: 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16392 +/- ##
============================================
- Coverage 71.98% 71.93% -0.05%
+ Complexity 64810 64759 -51
============================================
Files 5307 5308 +1
Lines 302719 302727 +8
Branches 43734 43733 -1
============================================
- Hits 217912 217779 -133
- Misses 66915 67043 +128
- Partials 17892 17905 +13 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM. A few comments for consideration, but feel free to have a good reason to do otherwise.
server/src/main/java/org/opensearch/index/translog/RemoteFsTimestampAwareTranslog.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java
Show resolved
Hide resolved
Why
As per that , we we need to keep files since last successful run of scheduler |
We only prevent deletion of metadata files if the |
…imestamps (#16392) Signed-off-by: Sachin Kale <[email protected]> (cherry picked from commit 78d2a4e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…imestamps (#16392) (#16400) (cherry picked from commit 78d2a4e) 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>
…imestamps (opensearch-project#16392) Signed-off-by: Sachin Kale <[email protected]>
Description
Metadata 2
but Metadata 1 will be deleted creating data loss issues forSnapshot 1
andSnapshot 2
.So, we need to fix Scenario 2. In this scenario, we need to keep the last metadata file before the pin timestamp fetch. Only keeping last md file is sufficient as any snapshot that is created will only refer to the last md file.
In this PR, we add last fetch timestamp to the pinned timestamp list to avoid deletion of last metadata file created prior to last fetch.
With change in this PR, we don't need changes done in Bugfix in snapshot V2 restore flow #16332 to always keep last deleted file. This improves stale data deletion as well.
Check List
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.