Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38e89f4657
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/Storages/IStorageCluster.cpp
Outdated
| if (send_external_tables) | ||
| external_tables = query_info.planner_context->getMutableQueryContext()->getExternalTables(); |
There was a problem hiding this comment.
Reset external-table forwarding state per query
send_external_tables is process state on the storage object and is only ever set to true in the GLOBAL-join path, so once one query enables it, later reads in other modes still take this branch; in those later reads query_info.planner_context may be null (old-analyzer path), so query_info.planner_context->getMutableQueryContext() can crash, and even when non-null it forwards external tables for unrelated queries. This needs to be scoped/reset per read instead of persisting across requests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
send_external_tables can be true only when object_storage_cluster_join_mode='global'. But if allow_experimental_analyzer=0 with object_storage_cluster_join_mode='global', exception n getQueryProcessingStage must be thrown.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb5e474d83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| LoggerPtr log; | ||
| String cluster_name; | ||
| bool send_external_tables = false; |
There was a problem hiding this comment.
Keep external-table send flag scoped to a single read
send_external_tables is stored as mutable state on IStorageCluster, but it is set from one query path and never reset before subsequent reads. After a GLOBAL-mode query sets it, later queries on the same storage instance can still forward external tables even when rewrite is not active; and because this field is non-atomic shared state, concurrent reads can race on it. This creates cross-query state leakage and undefined behavior risk in production read concurrency.
Useful? React with 👍 / 👎.
| throw Exception(ErrorCodes::NOT_IMPLEMENTED, | ||
| "object_storage_cluster_join_mode!='allow' is not supported without allow_experimental_analyzer=true"); | ||
| "object_storage_cluster_join_mode!='allow' is not supported without allow_experimental_analyzer=false"); |
There was a problem hiding this comment.
Correct inverted analyzer requirement in error message
This branch is entered when allow_experimental_analyzer is disabled, but the message says the mode is unsupported without allow_experimental_analyzer=false. That inverts the required value and points users to the wrong configuration change when they hit this exception.
Useful? React with 👍 / 👎.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Cluster Joins part 2 - global mode
Documentation entry for user-facing changes
Setting
object_storage_cluster_join_modewiith valueglobal.In queries like
when left table is executed on cluster (
s3Cluster,Icebergwithobject_storage_clustersetting, etc.) data from right table is extracted and sent to swarm nodes as temorary tables. JOIN is executed on swarm nodes.CI/CD Options
Exclude tests:
Regression jobs to run: