Repository navigation
replica: point-in-time restore edge cases - #3
Merged
Merged
Conversation
Wire RestoreOptions.timestamp through restore() -> calcRestorePlan() so a restore can target the latest backup at/before a given time (in addition to a txID boundary). Validate targets: reject negative txID, invalid dates, and passing both txID and timestamp. Timestamp restores query backends with useMetadata so createdAt is accurate, and only use files created strictly before the target. Add a RestoreGapError (ERR_RESTORE_GAP): a 'latest' restore over a non-contiguous file set now fails instead of silently returning a partial database. New PITR integration tests cover txID boundaries, timestamp restore, out-of-range targets, mutual exclusion, negative txID, and non-contiguous files.
Point-in-time restore (txID + timestamp) is now implemented and tested, so it no longer belongs under 'Deferred features'.
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.
Point-in-time restore edge cases for
Replica.restore().RestoreOptions.timestampis now wired throughrestore()tocalcRestorePlan(), so a restore can target the latest backup created at/before a given time as well as a txID boundary. Targets are validated: a negativetxID, an invalid date, or passing bothtxIDandtimestampare rejected withInvalidArgumentError. Timestamp restores query backends withuseMetadatasocreatedAtis accurate and only use files created strictly before the target.Added
RestoreGapError(ERR_RESTORE_GAP): a "latest" restore over a non-contiguous file set now fails instead of silently restoring a partial database.New PITR integration tests cover txID-boundary restore, timestamp restore, out-of-range targets (
NoMatchingBackupError), txID/timestamp mutual exclusion, negative txID, and non-contiguous files (RestoreGapError).