Use cluster table functions automatically if parallel replicas are enabled#70659
Use cluster table functions automatically if parallel replicas are enabled#70659alexey-milovidov merged 15 commits intomasterfrom
Conversation
src/Analyzer/Passes/ReplaceTableFunctionsWithClusterVariantsPass.h
Outdated
Show resolved
Hide resolved
src/Analyzer/Passes/ReplaceTableFunctionsWithClusterVariantsPass.h
Outdated
Show resolved
Hide resolved
a1c2b48 to
0ac14f6
Compare
84b81cc to
cb20417
Compare
2a1d093 to
3ff22e3
Compare
tests/queries/0_stateless/03275_auto_cluster_functions_with_parallel_replicas.sql
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/03275_auto_cluster_functions_with_parallel_replicas.sql
Outdated
Show resolved
Hide resolved
tests/queries/0_stateless/03275_auto_cluster_functions_with_parallel_replicas.sql
Outdated
Show resolved
Hide resolved
7a7864c to
44079bd
Compare
db1f28c to
46c234b
Compare
fc8e52a to
930b13a
Compare
src/Storages/IStorageCluster.cpp
Outdated
| const auto & current_settings = new_context->getSettingsRef(); | ||
| auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(current_settings); | ||
|
|
||
| size_t max_replicas_to_use = current_settings[Setting::max_parallel_replicas]; |
There was a problem hiding this comment.
Do we really need to limit all other queries (for example with explicitly specified Cluster function) to this number of used shards? By default it is 1 - so it is equivalent to disable cluster functions at all?
There was a problem hiding this comment.
Let's change the default value of max_parallel_replicas to 1000.
There was a problem hiding this comment.
Let's not change it to 1000 now, as it breaks too much stuff, but keep the old behaviour if max_parallel_replicas is set to 1.
There was a problem hiding this comment.
With enable_parallel_replicas = false it shouldn't matter.
There was a problem hiding this comment.
First it is , and second it breaks exactly in the same way with it set to allow_experimental_parallel_reading_from_replicasfalse.
I agree, it shouldn't, but here we are.
There was a problem hiding this comment.
Ok there is enable_parallel_replicas, but is it used anywhere? https://pastila.nl/?00a5bc6c/4efc387b98c06c1c64b483fdc04aab56#Y4GdPVZrAdhCymqZEmH5AA==
EDIT: it is an alias. My bad.
There was a problem hiding this comment.
Ok there is enable_parallel_replicas, but is it used anywhere?
Later, we'll switch to it in all the places
There was a problem hiding this comment.
Let's change the default value of max_parallel_replicas to 1000.
Split into #74504
| )", BETA) \ | ||
| \ | ||
| DECLARE(Bool, parallel_replicas_for_cluster_engines, true, R"( | ||
| Replace table function engines with their -Cluster alternatives |
There was a problem hiding this comment.
Could this elaborate a bit more on the functionality?
2ebaa0b to
96a1339
Compare
b36a0ec to
8d6ac55
Compare
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Replace table functions with their -Cluster alternatives if parallel replicas are enabled. Fixes #65024
Documentation entry for user-facing changes
CI Settings (Only check the boxes if you know what you are doing):