Revert "Allow partial sync after loading AOF with preamble (#2366)"#2925
Merged
ranshid merged 1 commit intovalkey-io:unstablefrom Dec 11, 2025
Merged
Conversation
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #2925 +/- ##
============================================
+ Coverage 72.44% 72.47% +0.02%
============================================
Files 129 129
Lines 70538 70524 -14
============================================
+ Hits 51104 51112 +8
+ Misses 19434 19412 -22
🚀 New features to boost your workflow:
|
murphyjacob4
approved these changes
Dec 11, 2025
Contributor
murphyjacob4
left a comment
There was a problem hiding this comment.
Revert LGTM. Caught up on the context and revert sounds like the correct approach until we revisit PSYNC from AOF design
enjoy-binbin
approved these changes
Dec 11, 2025
aradz44
pushed a commit
to aradz44/valkey
that referenced
this pull request
Dec 23, 2025
…#2366)" (valkey-io#2925) This reverts commit 2da21d9. The implementation in valkey-io#2366 made it possible to perform a partial resynchronization after loading an AOF file, by storing the replication offset in the AOF preamble and counting the bytes in the AOF command stream in the same way as we count byte offset in a replication stream. However, this approach isn't safe because some commands are replicated but not stored in the AOF file. This includes the commands REPLCONF, PING, PUBLISH and module-implemented commands where a module can control to propagate a command to the replication stream only, to AOF only or to both. This oversight led to data inconsistency, where the wrong replication offset is used for partial resynchronization as explained in issue valkey-io#2904. The revert caused small merge conflicts with 3c3a196 which are solved. Fixes valkey-io#2904. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
jdheyburn
pushed a commit
to jdheyburn/valkey
that referenced
this pull request
Jan 8, 2026
…#2366)" (valkey-io#2925) This reverts commit 2da21d9. The implementation in valkey-io#2366 made it possible to perform a partial resynchronization after loading an AOF file, by storing the replication offset in the AOF preamble and counting the bytes in the AOF command stream in the same way as we count byte offset in a replication stream. However, this approach isn't safe because some commands are replicated but not stored in the AOF file. This includes the commands REPLCONF, PING, PUBLISH and module-implemented commands where a module can control to propagate a command to the replication stream only, to AOF only or to both. This oversight led to data inconsistency, where the wrong replication offset is used for partial resynchronization as explained in issue valkey-io#2904. The revert caused small merge conflicts with 3c3a196 which are solved. Fixes valkey-io#2904. Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
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.
This reverts commit 2da21d9.
The implementation in #2366 made it possible to perform a partial resynchronization after loading an AOF file, by storing the replication offset in the AOF preamble and counting the bytes in the AOF command stream in the same way as we count byte offset in a replication stream.
However, this approach isn't safe because some commands are replicated but not stored in the AOF file. This includes the commands REPLCONF, PING, PUBLISH and module-implemented commands where a module can control to propagate a command to the replication stream only, to AOF only or to both. This oversight led to data inconsistency, where the wrong replication offset is used for partial resynchronization as explained in issue #2904.
The revert caused small merge conflicts with 3c3a196 which are solved.
Fixes #2904.