Skip to content

La Casa Del Dolor: keep Azure strict and min upload part sizes within max_upload_part_size - #128857

Merged
PedroTadim merged 1 commit into
ClickHouse:masterfrom
groeneai:casa-del-dolor-azure-upload-part-sizes
Nov 3, 2026
Merged

PedroTadim merged 1 commit into
ClickHouse:masterfrom
groeneai:casa-del-dolor-azure-upload-part-sizes

Conversation

@groeneai

@groeneai groeneai commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #94148

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

dolor.py exception fails in La Casa Del Dolor (amd_msan) on an unrelated PR: node0 never starts. Its server.err.log has Code: 471 ... Setting azure_strict_upload_part_size (87.22 MiB) can't be greater than setting azure_max_upload_part_size (16.00 MiB): While checking access for disk disk0. (INVALID_SETTING_VALUE).

The Azure object storage generator in properties.py draws strict_upload_part_size (0 to 100 MiB) and min_upload_part_size (with a rare 2**64 - 1) independently of max_upload_part_size (floor 16 MiB). RequestSettings::validateUploadSettings rejects strict > max and max < min, so the disk startup check throws and the server exits.

Both are now kept at or below the floor of max_upload_part_size (16 MiB, bits=24), as the S3 block already does for s3_min_upload_part_size. Strict sizes above 16 MiB are no longer drawn for Azure; the fixed-size buffer policy has no size-dependent branch, and the range still straddles max_single_part_upload_size (0 to 10 MiB). S3 has no strict > max rule, so it is unchanged.

Validation: the real add_single_disk was run 200k times on the old code and 300k times on the new code, and every Azure disk it generated was checked against the server's rules. Before: 4.23% of Azure disks rejected (3893 strict > max, 351 max < min). After: 0 of 149729 disks rejected, and 0 violations in 1M direct draws. With Azurite and a master server, the CI values fail with the same message, and the new extremes (strict = max = 16 MiB, min = 16 MiB - 1) start. A 40 MB merge then uploads as 3 staged blocks.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/128857]

Version info

  • Merged into: 26.11.1.1188-master (included in 26.11 and later)

… max_upload_part_size

The Azure object storage generator drew `strict_upload_part_size` (0..100 MiB,
plus a rare 2**64 - 1) and `min_upload_part_size` (rare 2**64 - 1) independently
of `max_upload_part_size` (floor 16 MiB). `RequestSettings::validateUploadSettings`
rejects strict > max and max < min, so the disk's startup `checkAccess` throws
INVALID_SETTING_VALUE, the server exits, and `dolor.py` only reports a startup
timeout. Seen in La Casa Del Dolor (amd_msan) on PR ClickHouse#111218: strict 87.22 MiB
against max 16 MiB.

Bound both under the lower bound of `max_upload_part_size` (16 MiB, bits=24),
as the S3 block already does for `s3_min_upload_part_size`. Driving the real
`add_single_disk`, about 4.2% of generated Azure disks were rejected before and
none after (150k disks, 1M direct draws).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings) plus an own cold review (1 nit).

# Sev Finding Verdict Evidence / action
1 💡 Azure strict_upload_part_size is no longer drawn above 16 MiB DISAGREE The fixed-size buffer policy has no size-dependent branch, and the new range still straddles max_single_part_upload_size; disclosed in the description.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding.

Session id: cron:clickhouse-review-slot-8:20261103-003915

@groeneai

groeneai commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

cc @PedroTadim, could you review this and add the can be tested label so CI runs? The Azure disk generator in properties.py drew strict_upload_part_size up to 100 MiB against a 16 MiB max_upload_part_size floor, so validateUploadSettings rejected the disk and the La Casa Del Dolor server never started; strict and min are now bounded under 16 MiB, as the S3 block already does for s3_min_upload_part_size.

@clickhouse-gh

clickhouse-gh Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ce0a19d]

Summary: ✅


AI Review

Summary

PR #128857 bounds Azure strict_upload_part_size and min_upload_part_size so randomized disk configurations satisfy RequestSettings::validateUploadSettings, preventing the reported startup failures. No actionable findings. A focused check passed all 2,304 threshold/default combinations and found zero validation failures in 24,860 generated Azure disks; the original generators reproduced both reported failures. This check exercised extracted generator definitions against the validation rules, without running a server or Azure uploads.

Final Verdict

✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci can be tested Allows running workflows for external contributors comp-testing Test content only (no production code). labels Nov 3, 2026
@PedroTadim PedroTadim self-assigned this Nov 3, 2026
@PedroTadim
PedroTadim added this pull request to the merge queue Nov 3, 2026
Merged via the queue into ClickHouse:master with commit 490524d Nov 3, 2026
354 of 355 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 3, 2026
PedroTadim pushed a commit to ylw510/ClickHouse that referenced this pull request Nov 6, 2026
S3RequestSettings::validateUploadSettings ran every part-size check under
`if (!strict_upload_part_size)`, so a non-zero strict size was never compared
with max_upload_part_size. A strict size selects FixedSizeBufferAllocationPolicy,
so WriteBufferFromS3 fills buffers of up to strict bytes; a write larger than
max_single_part_upload_size goes multipart and writePart throws the
LOGICAL_ERROR "Part size exceeded max_upload_part_size" on the first part
(La Casa Del Dolor (amd_debug), STID 2991-407b: strict 83 MiB, max 16 MiB).

Mirror the Azure check (cc4b9fe, ClickHouse#103394): reject strict > max with
INVALID_SETTING_VALUE in both modes. Every S3 request-settings entry point goes
through this function (disk creation, config reload, <s3> sections, s3() and
S3 engine query settings, query overrides on an S3 disk, BACKUP/RESTORE), so
such a configuration now fails up front instead of on the first large write.

La Casa Del Dolor drew s3_strict_upload_part_size up to 100 MiB against a
16 MiB floor for s3_max_upload_part_size (15.32% strict > max in direct draws,
3.83% of generated S3 disks). Cap it at 16 MiB with bits=24, as ClickHouse#128857 did for
Azure, so the new check does not stop Dolor servers from starting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-testing Test content only (no production code). pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants