fix: range-aware passthrough for Scylla manifest UploadPartCopy#122
Merged
Conversation
PR #121 only normalized ranges that matched metadata total_plaintext_size. Prod sends bytes=0-(~4768MB-1) while sidecar metadata totals ~6GB, so copies still routed to UPLOAD_PART_COPY_STREAMING and timed out at 300s. Allow large ranged copies from offset 0 when they align to internal ciphertext segments, filter segments for passthrough, and log UPLOAD_PART_COPY_ROUTE with passthrough_blocked_reason for future diagnosis. 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=0-(~4768MB-1)on.sm_*manifests while sourcebig-Data.dbsidecartotal_plaintext_sizeis ~6GB. PR fix: passthrough Scylla manifest UploadPartCopy with full-object range #121 only cleared ranges matching metadata total, so_can_passthrough_part_copystill rejected any range →UPLOAD_PART_COPY_STREAMING→ 300s timeout → HAProxy 400.upload_part_copyper segment, no re-encrypt).UPLOAD_PART_COPY_ROUTElog withroute,raw_copy_source_range,metadata_total_plaintext_mb,range_plaintext_mb, andpassthrough_blocked_reason.Tests
test_scylla_prod_shape_range_smaller_than_metadata_uses_passthrough— 149 internal parts, metadata inflated 1.27× (prod shape), range smaller than metadata total → passthrough not streamingtest_prod_shape_passthrough_eligibility_and_route— eligibility + normalize does not strip Scylla rangetest_segments_for_plaintext_range_*— segment alignment helpertest_small_partial_range_blocked_from_passthrough— partial 32MB range still re-encryptsPost-deploy verification
Expect
route=passthroughandUPLOAD_PART_COPY_PASSTHROUGHon*.sm_*manifest keys;UPLOAD_PART_COPY_STREAMINGcount should drop sharply.Made with Cursor