Repository navigation
Keep the Filesystem database's directory in the file-rename grant test - #118773
Merged
Merged
Conversation
`05057_file_rename_after_processing_write_grant` created a `Filesystem`
database over its `user_files` directory and then, on its last two lines,
dropped the database and removed the directory. The two cannot be made atomic:
the `DROP DATABASE` is a call into the server and fails whenever the server is
gone, which is routine under a stress run, while the `rm -rf` is local and
always succeeds.
What that left behind was a `Filesystem` database whose path no longer existed,
and `loadMetadata` aborts on it:
Application: Caught exception while loading metadata: Code: 36.
DB::Exception: Path does not exist:
/var/lib/clickhouse/user_files/05057_file_rename_after_processing_write_grant_test_...:
while loading database `fsdb_...` from file metadata/fsdb_....sql. (BAD_ARGUMENTS)
Every subsequent start of that server hit the same exception, so the job died
with `Cannot start clickhouse-server: server process is not running after 11
start attempts` and lost everything the stress run had left to check. Since the
test was added on 2026-09-04 this has been failing stress jobs on `master` and
on more than 20 unrelated pull requests, across `arm_tsan`, `amd_tsan`,
`arm_msan`, `amd_msan` and `arm_asan_ubsan, s3`.
Removing only the files keeps the directory the database points at, so a
database that survives the cleanup resolves and the server starts.
This does not address the second half of the issue - that a `Filesystem`
database with a missing directory prevents the whole server from starting,
rather than making one database unavailable - which is left for a separate
decision.
Closes: #118772
Contributor
|
Workflow [PR], commit [3534c14] Summary: ✅ AI ReviewSummaryThe PR updates Final Verdict✅ No findings. No inline review comments were posted. |
This was referenced Sep 8, 2026
This was referenced Sep 16, 2026
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.
05057_file_rename_after_processing_write_grantcreates aFilesystemdatabase over itsuser_filesdirectory and, on its last two lines, drops the database and then removes the directory. The two cannot be made atomic: theDROP DATABASEis a call into the server and fails whenever the server is gone — routine under a stress run, where the server is killed and restarted while the tests run — while therm -rfis local and always succeeds.What that leaves behind is a
Filesystemdatabase whose path no longer exists, andloadMetadataaborts on it:Every subsequent start of that server hits the same exception, so the job dies with
Cannot start clickhouse-server: server process is not running after 11 start attemptsand loses everything the stress run had left to check.Since the test was added on 2026-09-04 this has been failing stress jobs across the fleet — on
masterand on more than 20 unrelated pull requests over two days, acrossarm_tsan,amd_tsan,arm_msan,amd_msanandarm_asan_ubsan, s3:Removing only the files keeps the directory the database points at, so a database that survives the cleanup still resolves and the server starts.
This does not address the second half of the issue — that a
Filesystemdatabase with a missing directory prevents the whole server from starting, rather than making one database unavailable. AFilesystemdatabase is a view over a directory, and losing that directory bricking the server looks like a robustness defect in its own right; that is left for a separate decision.Closes: #118772
Related: #115798
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/118773]