fix(partitions): persist data on vsr backups, add data integrity test#3512
Open
hubcio wants to merge 1 commit into
Open
fix(partitions): persist data on vsr backups, add data integrity test#3512hubcio wants to merge 1 commit into
hubcio wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3512 +/- ##
=============================================
- Coverage 74.27% 50.64% -23.63%
Complexity 937 937
=============================================
Files 1259 1256 -3
Lines 125969 112478 -13491
Branches 101644 88194 -13450
=============================================
- Hits 93558 56967 -36591
- Misses 29396 52654 +23258
+ Partials 3015 2857 -158
🚀 New features to boost your workflow:
|
aff604f to
e87f76a
Compare
VSR's hash chain and checksum-keyed recovery require a committed op's on-disk bytes to match on every replica. Backups persisted 0-byte segments: the partition commit path drained the in-memory pipeline, which only the primary fills. And the append path stamped base_timestamp from a local now(), diverging bytes per node even once persisted. Backups now source committable ops from the journal when the pipeline is empty, and commit_messages flushes only the committed prefix (op <= commit_max), keeping the uncommitted tail resident. A backup thus never writes uncommitted bytes to its segment and never drops the headers a later commit needs - which would otherwise wedge commit_min below commit_max. base_timestamp reuses the prepare's monotonic timestamp, stamped once by the primary and replicated. A 3-node data-integrity test gates the cross-replica byte-identity.
e87f76a to
733633a
Compare
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.
VSR's hash chain and checksum-keyed recovery require a committed op's
on-disk bytes to match on every replica. Two defects broke that: the
partition commit path drained the pipeline, which only the primary
fills, so backups journaled replicated prepares but never flushed them
(0-byte segments); and append re-stamped base_timestamp from a local
now(), diverging bytes even once persisted.
commit_journal now falls back to the journal when the pipeline is
empty, so backups persist like the metadata plane. base_timestamp
reuses the prepare's monotonic timestamp, stamped once by the primary
and replicated. The 3-node data integrity test is un-ignored and gates
this.