Repository navigation
Use a private home directory in tests that run clickhouse as clickhouse-local - #128197
Merged
Merged
Conversation
…house-local` Tests `03536_ch_as_client_and_local` and `03134_positional_arguments` invoke the `clickhouse` binary in local mode without `--path` or `--tmp`, so it locks the persistent data directory `~/.local/share/clickhouse-local`. When two such invocations run concurrently, one of them fails with `Cannot lock file .../clickhouse-local/status. Another server instance in same directory is already running`. Point `HOME` and `XDG_DATA_HOME` at a per-test directory, as tests `05038_clickhouse_local_default_path` and others already do. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127774&sha=af134d26ecffd69a4d3aea84773369f50b35be87&name_0=PR&name_1=Fast%20test #127774 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Workflow [PR], commit [eec7df1] Summary: ✅ AI ReviewSummaryPR #128197 gives Final VerdictStatus: ✅ Approve. |
This was referenced Oct 30, 2026
huldarchen
pushed a commit
to huldarchen/ClickHouse
that referenced
this pull request
Oct 30, 2026
The test writes a script whose first line is `#!<path>/clickhouse-local --queries-file` and executes it. That run has no `--tmp` and no `--path`, so since ClickHouse#116042 it uses the default data directory in the home (`~/.local/share/clickhouse-local`, or `$XDG_DATA_HOME/clickhouse-local`) and holds the `status` lock there. Any other run using the same directory at that moment makes one of them fail with `Code: 76 ... Cannot lock file .../status` (CANNOT_OPEN_FILE). Seen on master in `Stateless tests (amd_tsan, parallel)`. `--tmp` cannot be added to the shebang line: Linux passes everything after the interpreter path as a single argument. The environment is the only channel into that process, so the test gets a private HOME and an empty XDG_DATA_HOME, the same block ClickHouse#128197 added to 03134 and 03536. Co-Authored-By: Claude Opus 5.5 <[email protected]>
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Nov 12, 2026
…ir-bare-binary-tests Take master's version of 03134_positional_arguments.sh and 03536_ch_as_client_and_local.sh: ClickHouse#128197 already gives both a private home. Co-Authored-By: Claude Opus 5.5 <[email protected]>
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Nov 12, 2026
ClickHouse#128197 isolated 03134 and 03536 with an exported per-test `HOME` and an empty `XDG_DATA_HOME`. Use the same block in 03267 instead of the per-command prefixes, so the five bare-binary `clickhouse-local` calls keep their argv and the three tests read the same. 03267 is the last stateless test that runs `clickhouse` as `clickhouse-local` in the shared default data directory. On master 587508f, a flaky-check style run (`--test-runs 30 --jobs 8`) of the master version fails 30/30 with `Code: 76 ... Cannot lock file .../clickhouse-local/status`; with this change it passes 30/30 and the shared directory is never created. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Tests
03536_ch_as_client_and_localand03134_positional_argumentsinvoke theclickhousebinary in local mode without--pathor--tmp, so it locks the persistent data directory~/.local/share/clickhouse-local. When two such invocations run concurrently, one fails withCannot lock file .../clickhouse-local/status. Another server instance in same directory is already running. This change pointsHOMEandXDG_DATA_HOMEat a per-test directory, as05038_clickhouse_local_default_pathand other tests already do.Failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127774&sha=af134d26ecffd69a4d3aea84773369f50b35be87&name_0=PR&name_1=Fast%20test
Related: #127774
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/128197]
Version info
26.11.1.909-master(included in26.11and later)