Skip to content

Antalya 26.6: Allow empty object storage cluster - #2221

Open
ianton-ru wants to merge 21 commits into
antalya-26.6from
feature/antalya-26.6/object_storage_cluster_allow_empty
Open

Antalya 26.6: Allow empty object storage cluster#2221
ianton-ru wants to merge 21 commits into
antalya-26.6from
feature/antalya-26.6/object_storage_cluster_allow_empty

Conversation

@ianton-ru

Copy link
Copy Markdown

Rebase of #2028

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Allow empty object storage cluster

Documentation entry for user-facing changes

With 'object_storage_cluster' setting query to s3,iceberg and some other sources are executed as cluster request.
But with swarm cluster, when initiator is not a cluster member, may be situation when no one swarm node is alive at the moment. In this case query is failed with CLUSTER_DOESNT_EXIST error.

New setting object_storage_cluster_fallback_if_empty allow to execute read query on local node in this case.

Write query is not executed on cluster right now, so attempt to write is still failed in this case to avoid situation when query is success when swarm is empty and failed when has some nodes alive.

PR is a little bit complex because:
s3(...) - can fall back if object_storage_cluster is empty (cluster does not have active nodes, not 'empty setting value')
s3(...) SETTINGS object_storage_remote_initiator=1 - failed on local node if object_storage_cluster is empty
s3(...) SETTINGS object_storage_remote_initiator=1, object_storage_remote_initiator_cluster='...' - decision about falling back must be made on remote initiator, on local node object_storage_cluster can be unknown.

But behavior is not changed for Cluster functions:

s3Cluster(...) - can't fall back
s3Cluster(...) SETTINGS object_storage_remote_initiator=1 - must failed on remote initiator if object_storage_cluster is empty.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

ianton-ru and others added 20 commits August 17, 2026 13:50
Share cluster resolution via resolveClusterRead so getQueryProcessingStage matches read when object_storage_cluster_fallback_if_empty is enabled, and skip local object_storage_cluster lookup when object_storage_remote_initiator and object_storage_remote_initiator_cluster are both set.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover pure fallback on unknown cluster, aggregate planning, remote-initiator interaction, and integration scenarios with locally unknown object_storage_cluster.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover stateless and integration cases where object_storage_cluster is missing locally and remote initiator falls back to non-cluster execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
…uster functions.

Distinguish s3() with object_storage_cluster setting from s3Cluster() argument
so fallback works for the former but explicit cluster names still fail when unknown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Distinguish alternative-syntax table functions from table reads so remote
initiator keeps s3() for fallback and uses cluster path for Iceberg tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
… cluster setting.

Track explicit *Cluster function arguments separately from table engine and
query object_storage_cluster settings so fallback works for persistent tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
Split storage policy from the setting check and route all local-fallback decisions through one helper so the resolve/read path is easier to follow.

Co-authored-by: Cursor <cursoragent@cursor.com>
… syntax.

Pure-send to a remote initiator requires object_storage_remote_initiator_cluster; otherwise keep the clustered path that defaults the initiator cluster to object_storage_cluster.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ster.

Under remote-initiator deferral, an empty local cluster name must fall back to pure send so ENGINE=S3/Iceberg without object_storage_cluster does not hit LOGICAL_ERROR.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the redundant pure-send gate, flatten fallback_to_pure, and reuse the already resolved remote-initiator cluster on the clustered path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Local fallback applies only to object_storage_cluster; a bad remote-initiator cluster must still report CLUSTER_DOESNT_EXIST.

Co-authored-by: Cursor <cursoragent@cursor.com>
Empty OSC with remote_initiator and no remote_initiator_cluster must keep BAD_ARGUMENTS even when fallback is enabled; extend tests for cases 1-3 and this regression.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pure-send ENGINE tables under remote-initiator deferral (preserving OSC in SETTINGS/context) so fallback matches s3() alternative syntax; extend TF and ENGINE tests for cases 1-3.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merge the two policy hooks into usesObjectStorageClusterSettingSyntax, share local-vs-remote fallback decisions between read and getQueryProcessingStage, and dedupe remote-initiator send.

Co-authored-by: Cursor <cursoragent@cursor.com>
…TTINGS.

object_storage_cluster may be unknown locally and defined on the remote (or the reverse); *Cluster would bake the name into the function argument and skip remote fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
…cluster.

Align flag semantics with s3()/iceberg() alternative syntax when the cluster name comes from SETTINGS rather than a *Cluster argument.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ter.

AST rewrite and setting-syntax checks only need cluster_name_from_function_argument.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Workflow [PR], commit [4cb369d]

@ianton-ru
ianton-ru marked this pull request as ready for review August 17, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant