Skip to content

fix: ClickHouse 500+ part uploads and GetBucketVersioning probe#125

Merged
ServerSideHannes merged 4 commits into
mainfrom
fix/upload-part-sequential-allocation
Jul 9, 2026
Merged

fix: ClickHouse 500+ part uploads and GetBucketVersioning probe#125
ServerSideHannes merged 4 commits into
mainfrom
fix/upload-part-sequential-allocation

Conversation

@ServerSideHannes

Copy link
Copy Markdown
Owner

Summary

  • Fix ClickHouse shadow backup 400s on client part 501+ by using sequential internal part allocation for UploadPart (sparse per-client ranges mapped part 501 → internal 10001, exceeding S3's 10k limit)
  • Answer GET ?versioning= locally with Suspended instead 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
  • Routing tests for ?versioning= handled locally
  • Existing sequential part numbering tests pass

Made with Cursor

ServerSideHannes and others added 4 commits July 9, 2026 17:36
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>
@ServerSideHannes ServerSideHannes merged commit 94e30ca into main Jul 9, 2026
11 checks passed
@ServerSideHannes ServerSideHannes deleted the fix/upload-part-sequential-allocation branch July 9, 2026 16:21
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