fix: hybrid passthrough for Scylla backup UploadPartCopy part 2#137
Merged
Conversation
Part 1 already passthrough-copied aligned ciphertext and deferred mid-frame tails, but part 2 was blocked at ranged_copy_nonzero_start and fell back to frame-by-frame streaming (~190 Hetzner GETs), causing InvalidPart under load. Mirror part 1's hybrid path for nonzero ranges: consume the deferred tail, re-encrypt only the misaligned head, and server-side copy the aligned bulk. Co-authored-by: Cursor <cursoragent@cursor.com>
Log hybrid_mode, passthrough segment counts, and estimated frame-read savings on UPLOAD_PART_COPY_ROUTE. Warn when part 2 still falls back to streaming so prod validation is obvious from logs alone. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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
bytes=starts (Scylla dedup part 2 after part 1's deferred mid-frame tail)streaming_headsplit + hybrid upload path: deferred tail + frame suffix re-encrypt once, then server-sideUploadPartCopyfor aligned bulkranged_copy_nonzero_startgate that forced part 2 onto frame-by-frame streaming (~190 Hetzner GETs →InvalidPartunder backup load)Test plan
uv run pytest tests/unit/test_upload_part_copy_passthrough.py(22 passed)uv run pytest tests/unit/test_source_read_retry.py tests/unit/test_streaming_copy.py(26 passed)UPLOAD_PART_COPY_PASSTHROUGHwithstreaming_head_mbon part 2, notUPLOAD_PART_COPY_STREAMINGMade with Cursor