Repository navigation
Use a unique random file name for the disk access check - #125098
Conversation
`IDisk::checkAccess` named its probe after the server UUID, so the name was unique only per server identity: two servers with the same `uuid` file (one data directory copied from the other) that share a disk location, such as an S3 prefix, and check it at the same time write, read and delete the same file, and one delete can fail the other's reads. Name the probe from a fresh random UUID per check, as the other two disk probes (`DiskLocalCheckThread` and `IDisk::isCaseInsensitive`) already do. The `clickhouse_access_check_` prefix is kept, so prefix-scoped bucket policies keep working. The Nil-server-UUID guard goes with the dependency: both programs that run startup checks load the UUID before any disk starts. Follow-up to ClickHouse#124184 (comment) 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; 3 findings; 1 full pass, no fix round needed).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261010-194300 |
|
Workflow [PR], commit [73f29bd] Summary: ✅
AI ReviewSummaryThis PR changes Final Verdict
|
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 10 s compile time in total, 7 of them have a recent master baseline. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Follow-up to #124184, as asked in #124184 (comment).
The disk startup access check (
IDisk::checkAccess) named its probeclickhouse_access_check_<server UUID>, so the name was unique only per server identity: two servers with the sameuuidfile (one data directory copied from the other) that check a shared location where the object key is the file name (ans3_plainorplain_rewritableprefix, a shared local path) at the same time write, read and delete the same file, so one server's delete can fail the other's check.The probe is now named from a fresh random UUID per check, as the other two disk probes already are (
clickhouse_disk_checker_<uuid>ofDiskLocalCheckThread,clickhouse_case_sensitivity_check_<uuid>ofIDisk::isCaseInsensitive). Theclickhouse_access_check_prefix is kept, so prefix-scoped bucket policies keep working. The server UUID dependency and its "Server UUID is not initialized" guard are removed; both programs that run the check load the UUID before any disk starts. One trade-off, shared with the other two probes: a probe left by a check that fails between its write and its delete is no longer overwritten by the next start.This does not change the
test_database_backupfailure fixed in #124184: the servers there already used different names.Validation: strace of a server with two local disks, started twice. On master all four checks use the one name
clickhouse_access_check_<serverUUID()>; with the change they use four distinct names, each created and unlinked once, and nothing is left behind.02454_create_table_with_custom_disk,02714_local_object_storage,03008_local_plain_rewritable(10 randomized runs each),test_merge_tree_s3::test_simple_insert_selectandtest_database_backuppass.Workflow [PR]
Sync PR [sync-upstream/pr/125098]
Version info
26.10.1.2111-master(included in26.10and later)