-
Notifications
You must be signed in to change notification settings - Fork 101
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
Implement Configurable Retention Period for Delta Snapshots #640
Implement Configurable Retention Period for Delta Snapshots #640
Conversation
This commit introduces a new parameter, `delta-snapshot-retention-period`, in the `SnapshotterConfig`, allowing users to customize the retention period for delta snapshots. The garbage collection function `GarbageCollectDeltaSnapshots` is modified to use this new setting, ensuring delta snapshots within the user-specified period are not deleted.
- Improved grammar and phrasing for better readability. - Fixed doc string for 'GarbageCollectDeltaSnapshots' function.
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.
Thanks for addressing my comments @seshachalam-yv!
It looks good, just one last comment about the tests. Please address that
Co-authored-by: Aaron Francis Fernandes <[email protected]> Update snapshotter_test.go with additional safety checks
4624166
to
89483ec
Compare
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.
@seshachalam-yv thanks for the PR as well as detailed doc. I have few suggestions, but overall logic looks good.
Co-authored-by: Shreyas Rao <[email protected]>
6d6eaf7
to
182d3dd
Compare
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.
@seshachalam-yv thank for making all the requested changes. No further comments.
Please create the two new issues as specified in the comments.
/lgtm
The integration test is failing due to a CI infrastructure issue. However, I have run it locally and it passed successfully, as shown in this test-output.txt. Consequently, I am proceeding to merge this PR. |
…#640) * `feat: Implement configurable retention period for delta snapshots` This commit introduces a new parameter, `delta-snapshot-retention-period`, in the `SnapshotterConfig`, allowing users to customize the retention period for delta snapshots. The garbage collection function `GarbageCollectDeltaSnapshots` is modified to use this new setting, ensuring delta snapshots within the user-specified period are not deleted. * Fixed lint error * Fixed failing unit test * Refactor and improve unit tests for GarbageCollectDeltaSnapshots * Addressed PR feedback - Improved grammar and phrasing for better readability. - Fixed doc string for 'GarbageCollectDeltaSnapshots' function. * Update snapshotter_test.go with additional safety checks Co-authored-by: Aaron Francis Fernandes <[email protected]> Update snapshotter_test.go with additional safety checks * Apply suggestions from code review Co-authored-by: Shreyas Rao <[email protected]> * Addressed review feedback --------- Co-authored-by: Shreyas Rao <[email protected]>
) * `feat: Implement configurable retention period for delta snapshots` This commit introduces a new parameter, `delta-snapshot-retention-period`, in the `SnapshotterConfig`, allowing users to customize the retention period for delta snapshots. --------- Co-authored-by: Shreyas Rao <[email protected]>
What this PR does / why we need it:
This PR resolves the request for a configurable retention period for delta snapshots. This feature aims to provide users with more flexibility in preserving delta snapshots for both GC policies (
Exponential
andLimit-Based
)Changes introduced in this PR include:
delta-snapshot-retention-period
parameter in theSnapshotterConfig
to allow for the customization of the retention period for delta snapshots. This new setting can be adjusted via command-line flags.GarbageCollectDeltaSnapshots
function, formerlygarbageCollectDeltaSnapshots
, to utilize theDeltaSnapshotRetentionPeriod
parameter when identifying delta snapshots for deletion. This change ensures that delta snapshots within the user-specified retention period will not be deleted.doc/usage/garbage_collection.md
) to include a detailed explanation of the newdelta-snapshot-retention-period
setting.GarbageCollectDeltaSnapshots
to add unit tests.snapshotter_test.go
Which issue(s) this PR fixes:
Fixes #639
Special notes for your reviewer:
Release note: