Skip to content

fix: hybrid passthrough for Scylla backup UploadPartCopy part 2#137

Merged
ServerSideHannes merged 3 commits into
mainfrom
fix/part2-hybrid-passthrough
Jul 20, 2026
Merged

fix: hybrid passthrough for Scylla backup UploadPartCopy part 2#137
ServerSideHannes merged 3 commits into
mainfrom
fix/part2-hybrid-passthrough

Conversation

@ServerSideHannes

Copy link
Copy Markdown
Owner

Summary

  • Extend range-aware passthrough to handle nonzero bytes= starts (Scylla dedup part 2 after part 1's deferred mid-frame tail)
  • Add streaming_head split + hybrid upload path: deferred tail + frame suffix re-encrypt once, then server-side UploadPartCopy for aligned bulk
  • Remove ranged_copy_nonzero_start gate that forced part 2 onto frame-by-frame streaming (~190 Hetzner GETs → InvalidPart under 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)
  • Deploy image tag + bump ArgoCD chart
  • Confirm next Scylla backup shows UPLOAD_PART_COPY_PASSTHROUGH with streaming_head_mb on part 2, not UPLOAD_PART_COPY_STREAMING

Made with Cursor

ServerSideHannes and others added 3 commits July 20, 2026 13:23
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>
@ServerSideHannes
ServerSideHannes merged commit c94cd5a into main Jul 20, 2026
11 checks passed
@ServerSideHannes
ServerSideHannes deleted the fix/part2-hybrid-passthrough branch July 20, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant