Repository navigation
La Casa Del Dolor: keep Azure strict and min upload part sizes within max_upload_part_size - #128857
Conversation
… 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]>
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).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261103-003915 |
|
cc @PedroTadim, could you review this and add the |
|
Workflow [PR], commit [ce0a19d] Summary: ✅ AI ReviewSummaryPR #128857 bounds Azure Final Verdict✅ Approve |
490524d
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]>
Related: #94148
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
dolor.py exceptionfails in La Casa Del Dolor (amd_msan) on an unrelated PR:node0never starts. Itsserver.err.loghasCode: 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.pydrawsstrict_upload_part_size(0 to 100 MiB) andmin_upload_part_size(with a rare2**64 - 1) independently ofmax_upload_part_size(floor 16 MiB).RequestSettings::validateUploadSettingsrejects 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 fors3_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 straddlesmax_single_part_upload_size(0 to 10 MiB). S3 has no strict > max rule, so it is unchanged.Validation: the real
add_single_diskwas 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
26.11.1.1188-master(included in26.11and later)