test: document compressed batch delta interop upstream limitation#3231
Merged
Conversation
Add upstream self-roundtrip test for compressed batch delta transfers to document the upstream rsync 3.4.1 limitation where the batch format does not record which compression algorithm was used. Upstream's read-batch always forces CPRES_ZLIB (compat.c:194-195), but write-batch may auto-negotiate zstd, producing unreadable batch files. oc-rsync avoids this by recording uncompressed data in batch files (do_compression=false in stream flags). Document this design decision across batch_support.rs, replay.rs, compressed_writer.rs, and flags.rs. Refs: #1705
Upstream rsync 3.4.1 cannot read back its own compressed delta batch files - the batch writer records raw compressed tokens but the reader expects uncompressed data. This is an upstream limitation, not an oc-rsync bug.
4c97534 to
e5a2c16
Compare
oferchen
added a commit
that referenced
this pull request
May 1, 2026
…interop test: document compressed batch delta interop upstream limitation
oferchen
added a commit
that referenced
this pull request
May 5, 2026
…interop test: document compressed batch delta interop upstream limitation
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
test_upstream_compressed_batch_self_roundtripinterop test that verifies upstream rsync can read its own compressed delta batch files (using--compress-choice=zlibworkaround), and that oc-rsync can also read thembatch_support.rs,replay.rs,compressed_writer.rs,flags.rs, and shell test scripts explaining the design decision and upstream limitationdo_compressionis always false in oc-rsync batch context regardless of compression configBackground
Task #1705 investigated "WARNING: failed verification" errors when reading compressed batch files with delta transfers. The investigation found this is an upstream rsync 3.4.1 limitation, not an oc-rsync bug:
do_compression=truein stream flagsparse_compress_choice()mapsdo_compression=1toCPRES_ZLIBregardless of the actual algorithmoc-rsync avoids this entirely by recording uncompressed data in batch files (
do_compression=false), making batch files portable across all compression backends.Test plan
upstream-compressed-batch-self-roundtrippassescompressed-batch-delta-interoptest continues to passbatch_context_do_compression_false_regardless_of_compress_configpasses