Skip to content

Do not randomize cast_keep_nullable in the upgrade check's pre-upgrade load - #119768

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix/upgrade-check-cast-keep-nullable
Sep 13, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix/upgrade-check-cast-keep-nullable

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

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):

Do not randomize cast_keep_nullable in the upgrade check's pre-upgrade stress load.

Since #116783 the stress randomization enables cast_keep_nullable = 1 in a third of the runs, and, unlike its sibling arms, without the not upgrade_check guard. The upgrade check runs that load against the previous release's server (26.8.2.7), which predates #119385: it matches the sorting key CAST(json.b, 'String') to the same expression in ORDER BY by name and arity only, although under cast_keep_nullable = 1 the query types it Nullable(String) while the key is String. Read-in-order with read_in_order_use_virtual_row = 1 then aborts the shipped 26.8 server in setVirtualRow with Logical error: Virtual row has different type for CAST(__table1.json.b, 'String'_String). Expected ... Nullable(String) ..., got ... String while running 03277_json_subcolumns_in_primary_key.

This made Upgrade check (amd_release) red on dozens of unrelated pull requests (57 on 2026-09-11, 23 on 2026-09-12, 7 on 2026-09-13 per the CI database), including heads that already contain #119385, because the exception is raised by the old binary, which no master change can fix. The arm is guarded like the sibling serialize_query_plan arm was in 5620afa. The guard can be lifted once the previous release used by the upgrade check contains #119385.

Example failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=99495&sha=c84da07b7cc18cc399ef06b7fc656f99a72b713a&name_0=PR&name_1=Upgrade%20check%20(amd_release)

Related: #116783
Related: #119385
Related: #99495

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.9.1.1388 (included in 26.9 and later)

…ade load

Since #116783 the stress randomization enables `cast_keep_nullable = 1` in a third
of the runs, and, unlike its sibling arms, without the `not upgrade_check` guard.
The upgrade check runs that load against the previous release's server (26.8.2.7),
which predates #119385: it matches the sorting key `CAST(json.b, 'String')` to the
same expression in `ORDER BY` by name and arity only, although under
`cast_keep_nullable = 1` the query types it `Nullable(String)` while the key is
`String`. Read-in-order with `read_in_order_use_virtual_row = 1` then aborts the
shipped 26.8 server in `setVirtualRow` with `Logical error: Virtual row has
different type` while running `03277_json_subcolumns_in_primary_key`, so
`Upgrade check (amd_release)` went red on dozens of unrelated pull requests
(57 on 2026-09-11, 23 on 2026-09-12, 7 on 2026-09-13). A master fix cannot clear it,
because the exception is raised by the old binary. Guard the arm like the sibling
`serialize_query_plan` arm (5620afa).

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=99495&sha=c84da07b7cc18cc399ef06b7fc656f99a72b713a&name_0=PR&name_1=Upgrade%20check%20(amd_release)
PR: #99495

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6b1566c]

Summary: ✅


AI Review

Summary

This PR stops stress.py from injecting cast_keep_nullable=1 into the upgrade check's pre-upgrade stress load, which is exactly the path that still runs against the previous release binary. I traced upgrade_check through tests/docker_scripts/upgrade_runner.sh and the stress harness; this client option was the only randomization carrier for cast_keep_nullable on that path, so the new guard is correctly scoped and I do not see a remaining contract issue in the current diff.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). labels Sep 13, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Sep 13, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 13, 2026
Merged via the queue into master with commit abcadc3 Sep 13, 2026
176 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix/upgrade-check-cast-keep-nullable branch September 13, 2026 13:08
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). 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.

2 participants