fix: hybrid passthrough for Scylla manifest mid-frame range tail#123
Open
ServerSideHannes wants to merge 2 commits into
Open
fix: hybrid passthrough for Scylla manifest mid-frame range tail#123ServerSideHannes wants to merge 2 commits into
ServerSideHannes wants to merge 2 commits into
Conversation
2026.7.15 logged passthrough_blocked_reason=ranged_copy_segment_misaligned: manifest ranges (bytes=0-4999341931) end ~1.1MB into an 8.33MB encrypted frame. Copy all complete ciphertext segments server-side and re-encrypt only the trailing suffix instead of falling back to full streaming. Co-authored-by: Cursor <cursoragent@cursor.com>
Add request-scoped context (path, uploadId, partNumber) to MEMORY_*, REQUEST_* and S3_ERROR_RESPONSE logs so prod 4xx/5xx are diagnosable without guessing. Harden the postgres-style UploadPart path: map InvalidPart/EntityTooSmall ClientErrors to 400, reject internal part ranges past S3's 10k ceiling, detect truncated upload bodies, retry Redis WATCH conflicts with backoff (25 attempts), and raise S3 read_timeout to 300s for slow seaweed uploads. 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
passthrough_blocked_reason=ranged_copy_segment_misaligned: Scylla sendsbytes=0-4999341931(~4767MB) but internal frames are ~8.33MB (50MB upload / 6), so the range ends mid-frame_split_plaintext_range_on_segments→ passthrough all complete ciphertext segments + re-encrypt only the trailing suffix (UPLOAD_PART_COPY_PASSTHROUGH_TAIL)streaming_tail_mbon passthrough events for diagnosisTests
test_split_plaintext_range_allows_hybrid_tail— split logictest_scylla_prod_shape_*— uses prod exact range end4999341931+ 8.33MB frames; expects 500+upload_part_copy+ 1upload_parttailPost-deploy
Expect
route=passthrough,passthrough_blocked_reason=null, andstreaming_tail_mb~1MB on.sm_*manifests.Made with Cursor