fix: ClickHouse 500+ part uploads and GetBucketVersioning probe#125
Merged
Conversation
ClickHouse shadow backups exceed 500 x 5MB parts; sparse per-client internal ranges mapped client part 501 to internal 10001 (> S3 10k limit). Use sequential allocation like UploadPartCopy. Stub GetBucketVersioning locally to stop backend 400 noise from backup agent probes. Co-authored-by: Cursor <cursoragent@cursor.com>
Use per-upload dense_single_internal mode: 5MB-only uploads map client part N to internal N (supports 600+ parts). First multi-internal client part clears dense mode and restores sparse ranges for out-of-order safety. Co-authored-by: Cursor <cursoragent@cursor.com>
Log allocation_mode, sparse vs dense ranges, and HIGH_CLIENT_PART_ALLOCATED at part 500+. Infer dense_single_internal=false from legacy Redis state when single-internal parts used sparse numbering (client 2 → internal 21). 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
UploadPart(sparse per-client ranges mapped part 501 → internal 10001, exceeding S3's 10k limit)GET ?versioning=locally withSuspendedinstead of forwarding to Hetzner backend (stops 400 320 noise from backup agent probes)Root cause
ClickHouse backups upload 500+ x 5MB parts per tar. UploadPart used sparse allocation (
client_part * 20), so part 501 tried internal part 10001 →InvalidPart/ 400 ~459b.Test plan
test_clickhouse_600_part_upload_sequential_internal_numbers— parts 1–600 map to internal 1–600?versioning=handled locallyMade with Cursor