Antalya 26.1; Remote initiator improvements 2#1608
Antalya 26.1; Remote initiator improvements 2#1608ianton-ru wants to merge 3 commits intoantalya-26.1from
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a03617679
ℹ️ 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".
| const auto & settings = context->getSettingsRef(); | ||
|
|
||
| is_cluster_function = !settings[Setting::object_storage_cluster].value.empty() && typename Base::Configuration().isClusterSupported(); | ||
| is_cluster_function = typename Base::Configuration().isClusterSupported(); |
There was a problem hiding this comment.
Preserve simple-mode fallback when no cluster is configured
Assigning is_cluster_function from Base::Configuration().isClusterSupported() unconditionally forces s3(...)/iceberg(...) fallback functions into cluster mode even when object_storage_cluster is empty. In the CREATE TABLE ... AS <table_function> path, arguments are parsed before validateUseToCreateTable() is called, so this change now makes validateUseToCreateTable() throw for previously valid non-cluster statements like CREATE TABLE t AS s3(...). Please keep cluster mode gated by an actual configured cluster name (or a narrower remote-initiator condition) to avoid regressing non-cluster table-function creation.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed463afe38
ℹ️ 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".
| is_cluster_function = (!settings[Setting::object_storage_cluster].value.empty() || !settings[Setting::object_storage_remote_initiator_cluster].value.empty()) | ||
| && typename Base::Configuration().isClusterSupported(); |
There was a problem hiding this comment.
Gate cluster fallback on remote initiator being enabled
This condition now flips to cluster-mode parsing whenever object_storage_remote_initiator_cluster is set, even if object_storage_remote_initiator is disabled. That changes plain s3/iceberg/... table-function behavior globally for sessions that carry only the cluster-name setting (for example from a profile), and can trigger cluster-only restrictions such as validateUseToCreateTable() rejecting create-table usage unexpectedly.
Useful? React with 👍 / 👎.
ed463af to
c60f71f
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
c60f71f to
b1efb77
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1efb77d2a
ℹ️ 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
| const auto & settings = context->getSettingsRef(); | ||
| ASTPtr query_to_send = query_info.query; | ||
|
|
||
| if (!isClusterSupported() || cluster_name_from_settings.empty()) |
There was a problem hiding this comment.
Exclude non-cluster storages from remote-initiator rewrite
The new if (!isClusterSupported() || cluster_name_from_settings.empty()) branch now routes object_storage_remote_initiator=1 queries through updateQueryToSendIfNeeded(..., make_cluster_function=false) even when the storage explicitly reports isClusterSupported()==false. For datalake configs like StorageLocalPaimonConfiguration (used by PaimonLocal), StorageObjectStorageCluster::updateQueryForDistributedEngineIfNeeded cannot map the engine name (PaimonLocal) to a table function and throws a logical error before the remote call is built. Previously these queries fell back to pure local read; now they fail whenever remote initiator is enabled.
Useful? React with 👍 / 👎.
b1efb77 to
5ea8d78
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ea8d78f3f
ℹ️ 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
| std::vector<std::string> settings_to_restore = {"object_storage_remote_initiator", "object_storage_remote_initiator_cluster"}; | ||
| new_context->resetSettingsToDefaultValue(settings_to_restore); |
There was a problem hiding this comment.
Strip remote initiator cluster setting before forwarding
This path resets object_storage_remote_initiator_cluster only in new_context, but the forwarded SQL still keeps the query-level setting because only object_storage_remote_initiator is removed from ASTSetQuery. In the new flow where object_storage_remote_initiator_cluster is required when no local object_storage_cluster exists, every forwarded query can carry that setting to the remote host; mixed-version nodes (or profiles with setting constraints) can then fail on an otherwise valid query. Remove object_storage_remote_initiator_cluster from the forwarded query settings as well.
Useful? React with 👍 / 👎.
5ea8d78 to
fb624cb
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Audit: PR #1608 — Antalya 26.1: Remote initiator improvements 2Source: Altinity/ClickHouse#1608 User-facing intent: Allow Confirmed defectsMedium — Remote initiator ignored when
|
| Area | Notes |
|---|---|
| Scope reviewed | TableFunctionObjectStorageClusterFallback; IStorageCluster::read (new isClusterSupported early exit + empty-cluster + remote branches); IStorageCluster::convertToRemote (context + AST SETTINGS cleanup); StorageObjectStorageCluster::{getClusterName, readFallBackToPure, updateQueryToSendIfNeeded}; DataLakeConfiguration / is_cluster_supported; integration tests under tests/integration/test_s3_cluster/. |
| Categories failed | Remote-initiator path vs isClusterSupported() ordering (regression for isClusterSupported() == false). |
| Categories passed | Cluster-capable object storage + empty local cluster + remote initiator (unchanged vs prior split); setClusterNameInSettings for remote-only Fallback; stripping both remote-initiator-related settings from AST and context on convertToRemote; is_cluster_function still gated on non-empty object_storage_cluster + cluster support (CREATE TABLE / simple mode). |
| Assumptions / limits | Static review; integration tests not executed here. Blast radius of the Medium finding is narrow (configurations that override isClusterSupported() to false). |
Notable code anchors
- Early cluster-support exit:
src/Storages/IStorageCluster.cpp—read()lines ~319–323 (!isClusterSupported()→readFallBackToPure). - Remote initiator (cluster-capable, empty local cluster): same file —
cluster_name_from_settings.empty()branch withobject_storage_remote_initiator. - Fallback +
cluster_name_in_settings:src/TableFunctions/TableFunctionObjectStorageClusterFallback.cpp—executeImpl. getClusterNamewhen cluster unsupported:src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp— returns""if!isClusterSupported().
Audit metadata
- Method: Static review (call graph / control-flow diff vs previous
antalya-26.1...HEAD, fault categories, spot-check for C++ / concurrency on touched paths). - Output rule: Confirmed defects only in the main list; improvements called out separately.
AI-generated audit note.
It is expected. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Use
object_storage_remote_initiatorwithoutobject_storage_clusteron initial node.Documentation entry for user-facing changes
Solved #1607
Query with
object_storage_remote_initiatorandobject_storage_remote_initiator_clustercan be executed, whenobject_storage_clustersetting is defined only on remote node.converted to
Remote node
random_node_from_swarm_external_nameexecutesas simple table function or as cluster table function depend on
object_storage_clusterdefined only on this node.CI/CD Options
Exclude tests:
Regression jobs to run: