Repository navigation
Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization - #104296
Conversation
|
Workflow [PR], commit [b651f92] Summary: ✅ AI ReviewSummaryThis PR adds an analyzer-side guard to disable or reject Findings❌ Blockers
Tests
Final Verdict
|
087f1b0 to
9c088a1
Compare
9c088a1 to
34a064a
Compare
5c2d3b5 to
38b242f
Compare
|
And this is a real problem, when local replica is slow, some follower will answer, and the answer will be wrong (since it does not apply filters) |
38b242f to
1658607
Compare
The problem:
Initiator: SELECT count() FROM t additional_table_filters = {'t': 'x != 0'}
Follower : SELECT count() FROM non_default_db.t additional_table_filters = {'t': 'x != 0'}
And now additional_table_filters cannot be matched on follower, let's
apply them if they do not have database, this will fix the problem.
…lel replicas and analyzer and w/o query plan serialization
|
@Algunenano I don't think we want to backport this, since the solution - disable additional_table_filters with parallel replicas for now, I will close backports |
The problem is that we backported the initial fix, which makes the test flaky in all those branches. |
Cherry pick #104296 to 26.5: Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
…lel replicas and analyzer and w/o query plan serialization
Backport #104296 to 26.5: Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
…with parallel replicas and analyzer and w/o query plan serialization (cherry picked from commit 1891234)
Two settings used by the upstream test do not exist on 25.8 (automatic_parallel_replicas_mode, query_plan_remove_unused_columns). Drop them and refresh the reference to capture 25.8's actual EXPLAIN PLAN output for the serialize_query_plan=1 path, which still goes through the trivial-count optimization on followers (count=23) — that divergence from master is tracked separately and not covered by the ClickHouse#104296 backport.
Backport #104296 to 26.4: Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
|
Indeed, but better not to backport such a change, but I've merged backports to 26.4+ |
Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
Backport ClickHouse#104296 to Stable 25.8 - Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
Backport ClickHouse#104296 to Antalya 25.8 - Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
…with parallel replicas and analyzer and w/o query plan serialization
…4296 Backport ClickHouse#104296 to 26.4: Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Disable
additional_table_filterswith parallel replicas and analyzer and w/o query plan serialization. Previously it may lead to incorrect results.Analyzer rewrites query when sending to remotes (parallel replicas followers) to prepend database, and this breaks the
additional_table_filters. And there is no clean way to fix this w/o query plan serialization (serialize_query_plan=1). So it has been explicitly disabled (throw exception) for now.Fixes: #104219
Fixes: #102921
Version info
26.5.1.88426.5.1.882,26.4.4.17