Skip to content

Add workaround for Clickhouse query condition cache bug - #6562

Open
apata wants to merge 1 commit into
masterfrom
fix-issue-with-unstable-results-from-invalid-query-caching
Open

Add workaround for Clickhouse query condition cache bug#6562
apata wants to merge 1 commit into
masterfrom
fix-issue-with-unstable-results-from-invalid-query-caching

Conversation

@apata

@apata apata commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Changes

There's a Clickhouse bug (fixed upstream in ClickHouse/ClickHouse#108488) that causes queries to return invalid values when run after a sampled query. This workaround disables use_query_condition_cache for all sampled queries and almost all queries in general (just not on the server/cluster as a whole). Can be removed when CH is updated.

I tried targeting just sampled queries (at the point where we add the log_comment setting to the query), but the sample statement can be deep in the Ecto query, so I didn't think it was durable enough.

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@github-actions

Copy link
Copy Markdown
Preview environment👷🏼‍♀️🏗️
PR-6562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant