Skip to content

Allowlist the expected 05024 KeeperMap metadata error in the upgrade check - #120990

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:allowlist-05024-keeper-map-metadata-upgrade-check
Sep 19, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:allowlist-05024-keeper-map-metadata-upgrade-check

Conversation

@groeneai

@groeneai groeneai commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Stop the upgrade check from failing on the KeeperMap metadata error that 05024_keeper_map_parenthesized_metadata writes on purpose and leaves behind when fault injection interrupts it before its cleanup.

Description

Upgrade check (amd_release) reds on Error message in clickhouse-server.log while every other sub-result is OK, so the job gives its PR no signal. Three measured runs, all on unrelated PRs touching no KeeperMap code, no 05024* test and not the runner; in each the fixture is 100% of the leaked lines (1/1, 1/1, 3/3).

Root cause: the job replays the previous release's suite, carrying 05024_keeper_map_parenthesized_metadata. It rewrites its own KeeperMap metadata znode into shapes a server must refuse, reverting them near the end of the file. Worker 1 runs with memory_tracker_fault_probability: on all three runs an injected Code: 241 stopped the file mid-rewrite, so its cleanup never ran and the tables survived with an unreadable znode. The upgrade restart re-attaches them and logs Failed to activate table because of invalid metadata in ZooKeeper per table instead of refusing to start, which #115941 made it do on purpose, replacing the startup abort of #115881.

The entry requires the StorageKeeperMap logger AND a backquoted fixture-prefixed table name AND the message, so the same message on any other KeeperMap table still reds the job. Replaying the job's own pipeline over each run's real log reproduces its upgrade_error_messages.txt byte for byte; the entry takes all three to 0 and matches nothing else across 156,750 real log lines.

Fixing the test cannot reach this job: the copy it replays pins ignore_drop_queries_probability = 0, so --fake-drop does not apply and its DROPs do drop - they just never ran. #120978 retires the neighbouring mutation entries by killing the leftovers instead; there is nothing to kill here, and dropping leftover KeeperMap tables wholesale would remove the cross-version attach coverage this job exists for. If cleanup is preferred to filtering here too, that new block is the place.

The three failing runs, what still reds, and the leftover-table precedent in this file

Still red with the entry in place, each checked against the real pipeline: the same message on another KeeperMap table (02418_test), the sibling connection issues message, the same message under an unrelated logger and under the sibling StorageKeeperMapBackup/StorageKeeperMapRestore loggers, a table name not at identifier start, a LOGICAL_ERROR on the very same fixture table, and the Code: 27 _delimiter_second attach failure.

Leftover-table precedent in this file, neither of which #120978 retires: c06040ab97f9c (04725's unresolvable host, frozen in the previous release's copy) and a271dbefd7977 (a Kafka table whose topic is already deleted).

Related: #115881
Related: #120978
Related: #120881
Related: #113983


Workflow [PR]
Sync PR [sync-upstream/pr/120990]

Version info

  • Merged into: 26.10.1.203 (included in 26.10 and later)

…check

The `Error message in clickhouse-server.log` sub-result of `Upgrade check
(amd_release)` fails on unrelated PRs because the post-upgrade server logs

  <Error> StorageKeeperMap (test_1.`05024_keeper_map_parenthesized_metadata_unparsable`
  (...)): Failed to activate table because of invalid metadata in ZooKeeper.
  Please DROP/DETACH table

for a table that `05024_keeper_map_parenthesized_metadata` deliberately left
with an unreadable `metadata` znode.

The job replays the previous release's suite under `stress --upgrade-check`.
The test rewrites its shared `metadata` znode through shapes a server must
refuse and reverts them near the end of the file; stress worker 1
(`--database=test_1`) runs with `memory_tracker_fault_probability`, so an
injected `Code: 241` can stop the file before the `DROP`s at its end run,
leaving the tables it created behind with an unreadable znode. The upgrade
restart re-attaches the surviving tables and logs the message above per table
instead of refusing to start, which is what ClickHouse#115941 made it do on purpose (it
replaced the startup abort of ClickHouse#115881), and the runner greps the post-upgrade
log for `<Error>`.

Measured on the three PRs the signature has hit (ClickHouse#94105, ClickHouse#118419, ClickHouse#94730): the
fixture accounts for 1/1, 1/1 and 3/3 of the leaked lines while every other
sub-result of the job is OK, so the check yields no signal at all for the
carrier.

The entry requires the `StorageKeeperMap` logger AND a backquoted table name
starting with the fixture prefix AND the message, so the same message on any
other KeeperMap table, which is the shape a real metadata-compatibility
regression takes, still fails the job. Replaying the job's own scan pipeline
over each carrier's `clickhouse-server.upgrade.log` reproduces that job's
`upgrade_error_messages.txt` byte for byte, and the entry takes each of the
three to zero; over the 156,750 pre-filter log lines the pattern matches
exactly the leaked lines and nothing else.

Related: ClickHouse#115881
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding labels Sep 19, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 7 findings over 3 full passes and
2 fix rounds), plus my own cold pass.

# Sev Finding Verdict Evidence / action
1 ⚠️ The entry anchored the fixture prefix to any backquoted identifier rather than to the table component, so a database whose name starts with that prefix also matched (upgrade_runner.sh:626) AGREE, fixed @ 1563d34dd7602 StorageID::getNameForLogs backquotes database and table independently, so the entry now pins the db. separator the Kafka entries on lines 632-633 already use, and a control keeps such a line reddening the job. Recorded as major, not a blocker: no database with that prefix exists in the tree, so no signal was being lost
2 ⚠️ The unbounded StorageKeeperMap.* prefix also accepts the sibling loggers StorageKeeperMapBackup and StorageKeeperMapRestore, contradicting the stated contract AGREE, fixed @ a82c1b5fded88 The emitting logger is fmt::format("StorageKeeperMap ({})", ...) (StorageKeeperMap.cpp:443), so anchoring the space and open paren excludes both siblings (:1322, :1353) at a cost of two characters, and two must-survive controls pin them. I dismissed this in round 1 on the false premise that no other logger starts with that name; the dismissal is reversed
3 ⚠️ The rationale attributed the surviving tables to --fake-drop, but the replayed copy of the test pins ignore_drop_queries_probability = 0 AGREE, fixed @ a82c1b5fded88 That copy carries the SET at line 10 ahead of every statement on all three tags in play, and a .sql test is one --multiquery session (clickhouse-test:3923-3927), so it governs the file. The tables survive because the injected Code: 241 stopped the file before its cleanup DROPs: the carrier's worker issued queries 44-48 and never 49..61. The comment, the commit message and the description now say that
4 ⚠️ The commit message claimed worker 1 is the only worker running with memory_tracker_fault_probability AGREE, fixed @ a82c1b5fded88 stress.py:439-440 gates that setting on i % 5 == 1 alone, so worker 6 gets it too; worker 1 is unique only in combining it with a persistent --database=test_1 (:380-381). The message now uses the non-exclusive form the comment and the description already had
5 💡 The allowlisted message covers any non-valid table status, so a regression confined to the parenthesized-metadata tolerance path would surface only on this fixture DISAGREE That path keeps its check inside the test itself: it rewrites the znode to the parenthesized form, DETACH/ATTACHes, then asserts the following INSERT and SELECT succeed, so such a regression reds the stateless suite directly rather than relying on this scan, and every other KeeperMap fixture (02418*, 02703*, 02706*) still reds this job
6 💡 The changelog entry read as though the fixture leaves the invalid metadata behind on purpose, when only an interruption makes that state survive AGREE, entry reworded The fixture writes the invalid shapes deliberately and restores them; persistence is the injected Code: 241. The entry now reads "writes on purpose and leaves behind when fault injection interrupts it before its cleanup"; the same phrase in the commit message stands, since its next paragraph states the mechanism
7 💡 The public metadata omitted full-URL relationship lines, and the commit message omits the three CI-report URLs AGREE on the body / DISAGREE on the commit message AGENTS.md:171-174 wants one full Related: link per line, and the description now carries four. AGENTS.md:167 is conditional on a URL being provided; these three come from a CIDB scan and sit in the description, which is what :169 asks for, and the three merged allowlist commits in this file carry no URL in their messages at all

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal
per finding. Findings on hunks a fix round changed are auto-dropped.

Residuals I am naming rather than hiding: the entry also masks the fixture's _delimiter and
_delimiter_second tables, whose znode the test never corrupts, so their real failure shape here is
the Code: 27 attach line, which this entry does not touch and a control pins; and the description
says "reverts them at the end of the file" where the shared-root revert is mid-file, as the commit
message says. Not adopted from finding 2: prefixing the matcher with <Error> , because the terminal
grep -Fa "<Error>" on line 649 already restricts the output.

Session id: cron:clickhouse-review-slot-8:20260919-075300

@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Sep 19, 2026
@clickhouse-gh clickhouse-gh Bot closed this Sep 19, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Sep 19, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a82c1b5]

Summary: ✅


AI Review

Summary

This PR adds a targeted allowlist entry to tests/docker_scripts/upgrade_runner.sh so Upgrade check (amd_release) stops failing on the expected StorageKeeperMap invalid-metadata errors left behind when the old 05024_keeper_map_parenthesized_metadata fixture is interrupted before cleanup. I reviewed the current diff, the surrounding log-filter pipeline, the 05024 stateless test, the StorageKeeperMap logger shape, and the cited failing CI reports. The new regex matches the observed leaked-table errors across all cited carriers while still staying scoped to that fixture family, and I did not find a correctness or signal-loss issue that merits a review comment.

Final Verdict

✅ No new findings.

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). labels Sep 19, 2026
@alexey-milovidov alexey-milovidov self-assigned this Sep 19, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 19, 2026
Merged via the queue into ClickHouse:master with commit 8e79629 Sep 19, 2026
176 of 349 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding manual approve Manual approve required to run CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants