Repository navigation
Conversation
…be file Every disk probes its access with the same file name, clickhouse_access_check_<server uuid>. Since custom disks are created outside storage_policies_mutex (#2573), two tables whose custom disks sit on one backing disk are started in parallel at server start, and their probes overwrite and unlink each other's file: the tables fail to attach with FILE_DOESNT_EXIST "While checking access for disk ...". Seen in test_filesystem_cache on #2805 (tables test and test_size_in_name, cache disks over hdd_blob). A process-wide mutex around the probe; config disks are created one after another anyway. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com> (cherry picked from commit 086efc9)
This branch has not been deployed
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.
Two tables whose custom disks sit on one backing disk fail to attach at server start:
Cannot open file …/clickhouse_access_check_<server uuid>orCan't unlink file clickhouse_access_check_…(FILE_DOESNT_EXIST)While checking access for disk …. Every disk probes its access with that one file name, and since #2573 custom disks are created outsidestorage_policies_mutex, so the probes of two disks over the same store overwrite and unlink each other's file. A process-wide mutex around the probe inIDisk::checkAccess; config disks are created one after another anyway, so nothing else changes.Seen on the 26.8 port #2805 in
test_filesystem_cache(tablestestandtest_size_in_name, cache disks overhdd_blob, server log at 12:15:44: three probes onhdd_blobwithin 1 ms, two fail on unlink; https://altinity-build-artifacts.s3.amazonaws.com/PRs/2805/a2147e556977e195b2d117c61b61d1274e080436/integration_tests_amd_asan_ubsan_db_disk_old_analyzer_5_8/job.log). antalya-26.6 carries 2573 since 2026-11-04; its integration suite has notest_cache_file_size_in_name, so the race has not shown in its CI.Testing
DiskAccessCheck.ProbesOfDisksOverOneDirectoryDoNotOverlap(src/Disks/tests/gtest_disk_access_check.cpp): two disks over one directory, started in parallel; the probe of the second must wait for the first. Fails before the fix (two probes at once), passes after, 20/20 repeats.unit_tests_dbms --gtest_filter='CAS*'on this branch: 2822 passed, 0 failed, 2 disabled.Related: #2573
Related: #2805
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Tables on custom disks that share a backing disk no longer fail to load at server start with
FILE_DOESNT_EXISTonclickhouse_access_check_<server uuid>: the disk access probes are serialized.Documentation entry for user-facing changes
CI/CD Options
Exclude tests:
Regression jobs to run: