Skip to content

Fix applying patch parts with query condition cache#90204

Merged
CurtizJ merged 1 commit intoClickHouse:masterfrom
CurtizJ:fix-lwu-condition-cache
Nov 18, 2025
Merged

Fix applying patch parts with query condition cache#90204
CurtizJ merged 1 commit intoClickHouse:masterfrom
CurtizJ:fix-lwu-condition-cache

Conversation

@CurtizJ
Copy link
Copy Markdown
Member

@CurtizJ CurtizJ commented Nov 17, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed possible incorrect query results after lightweight updates in SELECT queries with the enabled query condition cache. Fixes #90176. Fixes #90054.

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Nov 17, 2025

Workflow [PR], commit [60dec58]

Summary:

job_name test_name status info comment
Stateless tests (arm_asan, targeted) failure
03278_database_backup_merge_tree_table_disk_engine FAIL cidb
Stateless tests (amd_debug, parallel) failure
03212_variant_dynamic_cast_or_default FAIL cidb, flaky
Integration tests (amd_asan, old analyzer, 3/6) failure
test_remote_blobs_naming/test_backward_compatibility.py::test_replicated_merge_tree[test_case2] FAIL cidb
BuzzHouse (amd_debug) failure
Buzzing result failure cidb

@clickhouse-gh clickhouse-gh bot added the pr-bugfix Pull request with bugfix, not backported by default label Nov 17, 2025
@Michicosun Michicosun self-assigned this Nov 17, 2025
Copy link
Copy Markdown
Member

@Michicosun Michicosun left a comment

Choose a reason for hiding this comment

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

Should we start caching the range for the resulting part after applying all the lightweight updates (for example, just change name of the part in cache)?

@CurtizJ
Copy link
Copy Markdown
Member Author

CurtizJ commented Nov 17, 2025

just change name of the part in cache

It's better to do this, but I don't want to implement it right now. We need to add more information to the key in the query condition cache. Perhaps we can simply write the part name with the mutation version, as we have applied the patch parts.

@CurtizJ CurtizJ added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Nov 17, 2025
@CurtizJ CurtizJ added this pull request to the merge queue Nov 18, 2025
Merged via the queue into ClickHouse:master with commit ea48955 Nov 18, 2025
128 of 133 checks passed
@CurtizJ CurtizJ deleted the fix-lwu-condition-cache branch November 18, 2025 12:59
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 18, 2025
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 18, 2025
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Feb 8, 2026
clickhouse-gh bot added a commit that referenced this pull request Feb 8, 2026
Backport #90204 to 25.8: Fix applying patch parts with query condition cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR 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.

Wrong number of returned rows after Light-Weight update query result error after lightweight update

5 participants