Repository navigation
Conversation
`04510_mutation_query_plan_only_virtual_columns` asserts that `ALTER TABLE ... DELETE WHERE _table != ''` fails: `_table` comes from the local storage id, which a mutation cannot materialize, so the per-part read reaches `getFieldForConstVirtualColumn` and throws `NO_SUCH_COLUMN_IN_TABLE`. The throw happens in a background `MutatePlainMergeTreeTask`, so the client receives only the asserted `UNFINISHED` and the functional test passes, while `Code: 16` is written to the server log at `<Error>` level. The upgrade job replays it. `upgrade_runner.sh` runs the previous release's test tree, and `--upgrade-check` implies `--fake-drop`, so the table and its failed mutation survive the test's own `DROP`. The new server loads the pending mutation and retries it, 84 times inside the 60 second observation window, three `<Error>` lines each. All 252 lines reach `upgrade_error_messages.txt` and fail the job on a by-design test error. This is the `FIXME ClickHouse#39174` class the surrounding comment block already documents. The entry names the column and the `MergeTreeSequentialSource` read path rather than the emitting component, for two reasons. The error leaks in three shapes (`MutatePlainMergeTreeTask:`, the `executeStep()` line, and the wrapping `MergeTreeBackgroundExecutor:` line, 84 each), which only the shared message substring covers in one entry; and both qualifiers carry signal. Dropping the column name would also mask `Unexpected const virtual column: _sample_factor`, which from a mutation is ClickHouse#78465, the bug 04510 exists to guard. Dropping the read-path phrase would mask a regression on the query read path, which fills `_table` today. `_database` is left unmasked deliberately: no test mutates on it, so a first occurrence should be reviewed rather than pre-suppressed. Validated by replaying the failing run's 140435-line pre-filter log through the scan pipeline. The unmodified filter reproduces the job's own `upgrade_error_messages.txt` byte for byte (252 lines); with the entry no line survives and the job reports `No Error messages after server upgrade`. Exactly those 252 lines are removed. Twelve control lines, built from the real ones by substituting a single field, all still surface: `_sample_factor`, `_database`, a `LOGICAL_ERROR` from the same task, and the query-path variant.
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding), plus my own cold review
Severity: ❌ blocker / My cold review re-derived the filter's pattern text from source rather than from the quoted log row Session id: cron:clickhouse-review-slot-11:20260831-003600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20260831-002000 |
|
Workflow [PR], commit [16058d9] Summary: ✅ AI ReviewSummaryThis PR adds one allowlist entry to Final VerdictStatus: ✅ Approve |
|
cc @fm4v, could you review this? It adds one fixed string to the upgrade check server-log allowlist for the mutation error that |
84ac4b2
`04510_mutation_query_plan_only_virtual_columns` asserted that `ALTER TABLE ... DELETE WHERE _table != ''` fails with `UNFINISHED`, because the per-part read path could not materialize `_table`. This change makes that mutation succeed, so the test now asserts the fixed behavior: the row is deleted and one row remains. For the same reason the `Unexpected const virtual column: _table: While executing MergeTreeSequentialSource.` entry in the upgrade check error allowlist (added in #117218 as a workaround for exactly this bug) is removed: the pending mutation replayed after the upgrade now succeeds, so the message is no longer produced, and keeping the entry would mask a regression of this fix. The new test is renumbered to `05175_mutation_table_database_virtual_columns`, the next free number after the merge with `master`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Stop the upgrade check from failing on the mutation error that
04510_mutation_query_plan_only_virtual_columnsraises on purpose.Description
Upgrade check (*)reds on the job rowError message in clickhouse-server.logbecause of an error a test asserts on purpose.04510_mutation_query_plan_only_virtual_columnsrunsALTER TABLE ... DELETE WHERE _table != '' -- { serverError UNFINISHED }._tablecomes from the local storage id, which a mutation cannot materialize, so the per-part read reachesgetFieldForConstVirtualColumnand throwsNO_SUCH_COLUMN_IN_TABLE. It happens in a backgroundMutatePlainMergeTreeTask, so the client sees only the assertedUNFINISHEDand the test passes, whileCode: 16goes to the log at<Error>level.The upgrade run then replays it:
upgrade_runner.shruns the previous release's test tree, and--upgrade-checkimplies--fake-drop, so the table and its failed mutation survive the test's ownDROP. The new server loads the pending mutation and retries it, 84 times in the 60s observation window, three<Error>lines each. All 252 lines reachupgrade_error_messages.txtand red the job. This is theFIXME #39174class the surrounding comment block already documents: an intentionally-broken test mutation retried after upgrade.I validated by replaying the failing run's real 140435-line pre-filter log through the real scan pipeline. Unmodified, it reproduces CI's
upgrade_error_messages.txtbyte-identically (252 lines); with the entry, 0 survive and the job reportsNo Error messages after server upgrade. Exactly those 252 lines go, nothing else.The column name and the
MergeTreeSequentialSourceread path are both in the pattern, so_sample_factorfrom a mutation (that one is #78465, the bug 04510 guards) and the query-path variant still surface; dropping either from the pattern masks controls that must stay visible._databaseis deliberately left unmasked: no test mutates on it today, so a first occurrence should be reviewed rather than pre-suppressed.Related: #39174.
04510came from #109813. Sibling allowlist PR on the same file with a different root cause: #113983.Failing run: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113857&sha=bde3aeeaea976d74892ad3d48ac2b7c200629701&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29
Workflow [PR]
Sync PR [sync-upstream/pr/117218]
Version info
26.9.1.540(included in26.9and later)