Repository navigation
Fix the perf harness passing a cwd-relative user_files_path to its servers - #120964
egor-click merged 1 commit into
Conversation
…rvers
ci/jobs/scripts/perf/compare.sh started its servers with both
--path left/db
--user_files_path left/db/user_files
Server.cpp:1747 resolves the main `path` setting against the original working
directory, and every secondary path setting is then resolved against that
resolved `path`: getCanonicalPath(value, path_str) at :2015 for
user_files_path, and likewise for user_scripts_path, the dynamic UDF path,
top_level_domains_path, tmp_path, format_schema_path and
filesystem_caches_path. getCanonicalPath composes only when the value is
relative, so the containment root became
<perf_wd>/left/db/ + left/db/user_files
= <perf_wd>/left/db/left/db/user_files/
and the absolute ATTACH ... IcebergLocal('<perf_wd>/left/db/user_files/...')
statements written by ci/jobs/scripts/dataset_download.py fell outside it.
assertLocalPathCorrect then threw
Code: 481. File path .../perf_wd/left/db/user_files/tpch_ice_sf10/partsupp/
is not inside .../perf_wd/left/db/left/db/user_files/. (PATH_ACCESS_DENIED)
async table load failed, and compare.sh's own `select * from system.tables`
census returned Code: 722 ASYNC_LOAD_WAIT_FAILED.
That composition is the documented intent of aa7578d ("All secondary
path settings (like `user_files_path`, `tmp_path`, `format_schema_path`, etc.)
are resolved relative to the now-absolute main `path`"), and the open ClickHouse#100173
preserves it, so the harness is the side to correct rather than the server:
changing getCanonicalPath's base would re-open the bug that commit fixed, and
would move tmp_path, format_schema_path, filesystem_caches_path and
user_scripts_path for every installation that configures them relatively.
Capture the harness root once and use it for the one argument the server
composes against --path. pwd -P is physical, matching the Python side's
Utils.cwd(), because assertLocalPathCorrect compares the two textually after
canonicalization. --path itself stays relative: it is already resolved against
the original working directory. --keeper_server.storage_path is not composed
against `path` at all (KeeperContext.cpp:452-542 hands the string to
create_local_disk). --top_level_domains_path is left alone deliberately:
prefixing it would preserve a per-side suffix that nothing creates, since
performance_tests.py:1983 copies the lists to the shared
{perf_wd}/top_level_domains.
The measured servers (performance_tests.py:1168-1176) are launched with
absolute paths, so measurements were unaffected. The doubling belonged to
compare.sh's own restart, which confirm_changes uses to rerun and demote the
queries flagged changed_fail, so since the Iceberg perf dataset landed in
ac21da0 no flagged Iceberg query could be rerun, the standalone
entrypoint could not run the Iceberg suites or json_file_query.xml, and the six
perf test files that build their path from the raw user_files_path string got a
relative path.
Verified on a master server, relative vs absolute: the doubled directory is no
longer created, file('probe.csv') resolves, system.server_settings reports the
absolute path, and the IcebergLocal ATTACH succeeds while a path genuinely
outside the root is still refused with 481.
Related: ClickHouse#100394
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold read
Severity: ❌ blocker / Validation, for the record, since no test file changes: a master server was started twice with only Session id: cron:clickhouse-review-slot-10:20260919-031600 |
|
Workflow [PR], commit [19af905] Summary: ✅
AI ReviewSummaryThis PR fixes Final Verdict✅ No findings. |
e502343
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The performance comparison harness passes an absolute
user_files_pathto its servers.Description
Asked for on #100394: #100394 (comment)
Failing report,
amd_release, master_head, 4/6: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=100394&sha=feb6f069e538b9c1288e684f3c39e3583a57ac9e&name_0=PRcompare.shstarted its servers with--path left/dband--user_files_path left/db/user_files. The server resolvespathagainst the original working directory (Server.cpp:1747) and every secondary path setting against that resolvedpath(getCanonicalPath(value, path_str),:2015), so the containment root became<perf_wd>/left/db/left/db/user_files/, and the absoluteIcebergLocalpathsdataset_download.pywrites fell outside it:That is deliberate ("All secondary path settings ... are resolved relative to the now-absolute main
path",aa7578d2d00c6; #100173 keeps it), so the harness is the side to fix: it now passes the absolute path it already means, as its sibling launcherperformance_tests.py:1169always has.--pathis unchanged.The measured servers use absolute paths, so measurements were unaffected. The doubling belongs to compare.sh's own
restart, used byconfirm_changesto rerun flagged queries: since the Iceberg dataset landed (2026-09-08) no flagged Iceberg query could be rerun or demoted, the standalone entrypoint could not run the Iceberg suites, and the six tests reading the rawuser_files_pathstring got a relative one.Verified on a master server, relative vs absolute: the doubled directory disappears,
file('probe.csv')resolves,system.server_settingsreports the absolute path, and the ATTACH succeeds, while a path truly outside the root is still refused with 481.Two adjacent sites have the same shape with no observable consequence today, so I left them out: compare.sh's
--top_level_domains_pathpoints at a per-side directory nothing creates, andci/jobs/clickhouse_light.py's relative--workdirdefault doubles itsuser_filesroot the same way (nothing there readsuser_files); tell me and I will fix either.This does not fix the 10 errors there: they are one traceback truncated by
head -10, for aniceberg_suite_tpchquery over--max-query-seconds, owned by #120762.Workflow [PR]
Sync PR [sync-upstream/pr/120964]
Version info
26.10.1.180(included in26.10and later)