fix(config): reject snapshot retention shorter than interval - #1471
Open
UniversePeak wants to merge 1 commit into
Open
fix(config): reject snapshot retention shorter than interval#1471UniversePeak wants to merge 1 commit into
UniversePeak wants to merge 1 commit into
Conversation
Author
|
This PR has been open for over a week with all reported checks passing, including the focused config tests, lint, and cross-platform build checks. I’m following up on the review status when you have a chance. The change is limited to validating global and per-database snapshot retention against their intervals, with no runtime retention behavior changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject configurations where snapshot retention is shorter than the snapshot interval.
Problem
A configuration with
snapshot.intervalgreater thansnapshot.retentioncurrently starts successfully even though retention cannot preserve a full snapshot interval. This makes the retention setting ineffective and provides no startup signal.Solution
Validate the relationship for both global and per-database snapshot settings, returning a dedicated configuration validation error.
Scope
In scope:
snapshot.retentionversussnapshot.intervalvalidationNot in scope:
Test Plan
go test ./cmd/litestream -run 'TestConfig' -count=1go vet ./cmd/litestreamBoth commands pass locally. The full package suite has unrelated Windows-path and file-locking failures in this checkout.
Related