Repository navigation
Allowlist the expected FileLog bad-path reattach error in the upgrade check - #113983
Conversation
Internal second-model review (2 rounds, 0 blockers outstanding)An independent reviewer and a second model reviewed this change cold, twice. Round 1 raised two Round 1 — 2 majors, both AGREEd and fixed❌ The allowlist pattern was over-broad. ❌ The published root cause was false. The first revision attributed the table's survival to Round 2 — clean, plus one nit not fixed
Validation the review relied onRather than the synthetic fixture, the review used this run's own artifacts (PR #113781, sha Carrier coverage was re-derived independently: |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20260808-171700 |
|
cc @leshikus, could you review this? It adds one scoped |
|
Workflow [PR], commit [6a12105] Summary: ✅ AI ReviewSummaryThis PR adds a new allowlist entry to the post-upgrade log scrub in Findings
Final VerdictStatus: |
CI finish ledger - 58245a2CI is fully finished on this head and there are no failing checks.
Session id: cron:our-pr-ci-monitor:20260809-013000 |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 5 s compile time in total, 6 of them have a recent master baseline. |
CI finish ledger - 70cbee0No failures to own on this head: 26 checks succeeded, 151 were skipped, and praktika reports
The high skip count is expected for this diff, which touches only Session id: cron:our-pr-ci-monitor:20260813-183000 |
azat
left a comment
There was a problem hiding this comment.
Ok, though I doubt that the original test that introduced this is ever useful #104056
But:
- please make the check more generic do not include table/database name
- trim all comments, it is enough to say that the specific has explicit ATTACH query
- trim PR description
- squash all commits
… check `Upgrade check (amd_release)` intermittently fails its `Error message in clickhouse-server.log` sub-test on one benign line: <Error> StorageFileLog (test_1.filelog_bad_path_attach): The absolute data path should be inside `user_files_path`(/var/lib/clickhouse/user_files/) 04202_filelog_attach_path_outside_user_files has an explicit ATTACH query for a FileLog table whose path is outside `user_files_path`. ATTACH is LoadingStrictnessLevel::ATTACH, which is >= SECONDARY_CREATE, so the constructor takes the relaxed branch in src/Storages/FileLog/StorageFileLog.cpp: it logs at <Error> and returns instead of throwing BAD_ARGUMENTS. That branch is what the test covers, since refusing to load at reattach time would break server startup. The table outlives the test because stress threads run with a fixed --database=test_N (ci/jobs/scripts/stress/stress.py) and clickhouse-test skips its per-test teardown whenever --database is set, so the shared database is never dropped. The upgrade restart re-attaches the table, the relaxed branch fires again, and the line lands in the scanned log, where the post-restart scrub had no entry for it. The matcher keys on the StorageFileLog logger plus the message and carries no table or database name, so the same message is allowlisted for any FileLog table. The `): ` boundary keeps the discriminating cases visible: a different message from the same logger, this message from another storage, and a Code: 36 throw of the same text (the strict-mode path, a real failure) all still fail the job. Validated against the failing run's own 12.6 MB clickhouse-server.upgrade.log (PR ClickHouse#117355, sha cff5510): with the entry the scan artifact is empty, and with it removed the artifact is the 189-byte line CI reported as the failure. Related: ClickHouse#113781 Co-Authored-By: Claude Opus 5 <[email protected]>
f996ddf to
6a12105
Compare
|
All four done in 6a12105, which is now the single commit of this PR, on top of current master.
Re-validated against the failing run's own 12.6 MB On #104056: all that test asserts is that a FileLog |
| | grep -av -e "while loading part.*is encrypted in the backup, it can be restored only to an encrypted disk" \ | ||
| | grep -av -e "backup_database.*Detaching broken part.*backward incompatibility" \ | ||
| | grep -av -e "03277_database_backup_database_file_engine.*_restore.*Detaching broken part.*backward incompatibility" \ | ||
| | grep -av -e "StorageFileLog (.*): The absolute data path should be inside" \ |
There was a problem hiding this comment.
This is broader than the exception the PR describes. 04202_filelog_attach_path_outside_user_files is the only test in the tree that intentionally reattaches a FileLog outside user_files_path, but this regex suppresses the same startup error for any StorageFileLog table.
That means an unrelated leftover FileLog table with a bad path will now disappear from upgrade_error_messages.txt, so the upgrade check loses signal for a different regression. Please keep the ): boundary and pin the matcher back to the fixture table name, for example StorageFileLog (.*\\.filelog_bad_path_attach): The absolute data path should be inside.
There was a problem hiding this comment.
Your premise is right: 04202_filelog_attach_path_outside_user_files is the only test in the tree that attaches a FileLog outside user_files_path today. I am still not pinning the matcher back to it, because the generic form is what the reviewer asked for in the CHANGES_REQUESTED review this thread hangs off (#113983 (review)): "please make the check more generic do not include table/database name". The ): boundary you asked me to keep is kept.
Measured just now through this runner's own grep pipeline, 15 crafted log lines against three variants (the pushed generic entry, your (.*\.filelog_bad_path_attach) pin, and the entry deleted):
- 5 of the 15 differ between the two patterns, and they are all the same shape: this message from
StorageFileLogon some other table. That is the entire coverage difference. - Identical under both, still failing the job: a different message from the same logger, this message from another storage engine, this text with anything interposed before
):, aCode: 36 ... BAD_ARGUMENTSthrow of this text on any table, and that throw logged byApplication. - With the entry deleted, the fixture's own line comes back (189 bytes, byte-equal to the line CI reported), so the entry is not vacuous.
On losing signal for a different regression: the line this suppresses is only reachable on the load path. StorageFileLog.cpp:193 logs and returns when SECONDARY_CREATE <= mode and throws otherwise, so a bad path that actually breaks a table arrives as the Code: 36 throw, which still reds the check.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Upgrade check (amd_release)intermittently fails itsError message in clickhouse-server.logsub-test on one benign line:04202_filelog_attach_path_outside_user_fileshas an explicitATTACHquery for a path outsideuser_files_path, which is the relaxed reattach branch ofStorageFileLog: it logs at<Error>instead of throwing, and that is what the test covers. The table survives the test on a fixed--database=test_Nstress thread, so the upgrade restart re-attaches it and the line reaches the scanned log, which had no entry for it.The change is one
grep -aventry in that scan, keyed on the logger and the message only, so the message is allowlisted for any FileLog table. A different message from the same logger, this message from another storage, and aCode: 36throw of the same text still fail the job.Validated on the failing run's own 12.6 MB
clickhouse-server.upgrade.log(#117355,cff55108d19b): with the entry the scan artifact is empty, without it the artifact is the 189-byte line CI reported.Workflow [PR]
Sync PR [sync-upstream/pr/113983]
Version info
26.10.1.377-master(included in26.10and later)