Repository navigation
feat: add MSG_REDO wire protocol support for redo phase signaling - #2529
Merged
Merged
Conversation
Add MSG_REDO handling in the multiplexed reader, writer, and pipeline receiver to support upstream rsync's redo phase signaling protocol. - MultiplexReader: accumulate MSG_REDO file indices (4-byte LE i32) during reads, matching the MSG_NO_SEND accumulation pattern (upstream: io.c:1514-1519) - ServerReader: delegate take_redo_indices() to inner reader variants - ServerWriter: add send_redo(ndx) for sending MSG_REDO messages (upstream: receiver.c:970-974) - PipelinedReceiver: add drain_new_redo_indices() for non-disabling drain during pipeline loop (preserves redo mode for continued collection) - Handle MSG_REDO in both try_borrow_exact and read match arms Tests: 9 new tests covering accumulation, invalid payload rejection, interleaved MSG_REDO + MSG_NO_SEND, ServerReader delegation, and ServerWriter send_redo in both multiplex and plain modes.
oferchen
force-pushed
the
feat/redo-phase-signaling
branch
from
February 27, 2026 14:48
4ee5e9b to
caa4687
Compare
oferchen
added a commit
that referenced
this pull request
May 1, 2026
) Add MSG_REDO handling in the multiplexed reader, writer, and pipeline receiver to support upstream rsync's redo phase signaling protocol. - MultiplexReader: accumulate MSG_REDO file indices (4-byte LE i32) during reads, matching the MSG_NO_SEND accumulation pattern (upstream: io.c:1514-1519) - ServerReader: delegate take_redo_indices() to inner reader variants - ServerWriter: add send_redo(ndx) for sending MSG_REDO messages (upstream: receiver.c:970-974) - PipelinedReceiver: add drain_new_redo_indices() for non-disabling drain during pipeline loop (preserves redo mode for continued collection) - Handle MSG_REDO in both try_borrow_exact and read match arms Tests: 9 new tests covering accumulation, invalid payload rejection, interleaved MSG_REDO + MSG_NO_SEND, ServerReader delegation, and ServerWriter send_redo in both multiplex and plain modes.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
) Add MSG_REDO handling in the multiplexed reader, writer, and pipeline receiver to support upstream rsync's redo phase signaling protocol. - MultiplexReader: accumulate MSG_REDO file indices (4-byte LE i32) during reads, matching the MSG_NO_SEND accumulation pattern (upstream: io.c:1514-1519) - ServerReader: delegate take_redo_indices() to inner reader variants - ServerWriter: add send_redo(ndx) for sending MSG_REDO messages (upstream: receiver.c:970-974) - PipelinedReceiver: add drain_new_redo_indices() for non-disabling drain during pipeline loop (preserves redo mode for continued collection) - Handle MSG_REDO in both try_borrow_exact and read match arms Tests: 9 new tests covering accumulation, invalid payload rejection, interleaved MSG_REDO + MSG_NO_SEND, ServerReader delegation, and ServerWriter send_redo in both multiplex and plain modes.
2 tasks
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
MultiplexReaderto accumulate file indices from receiver-side checksum failures, following the same pattern as existing MSG_NO_SEND supportsend_redo(ndx)toServerWriterfor sending MSG_REDO messages over the multiplexed channeldrain_new_redo_indices()toPipelinedReceiverfor non-disabling drain during pipeline loopUpstream Reference
receiver.c:970-974— receiver sendssend_msg_int(MSG_REDO, ndx)on whole-file checksum failureio.c:1514-1519— generator-sideMSG_REDOhandler queues index toredo_listTest plan
cargo fmt --all -- --checkcleancargo clippy --workspace --all-targets --all-features --no-deps -- -D warningsclean