From feb19c90769b90d5de65983ffe61d69d75c0b38b Mon Sep 17 00:00:00 2001 From: Anton Ivashkin Date: Mon, 13 Oct 2025 12:56:01 +0200 Subject: [PATCH] Fix prefersLargeBlocks for cluster storage --- src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp | 7 +++++++ src/Storages/ObjectStorage/StorageObjectStorageCluster.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp b/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp index e1fb23aff13a..cf9215afe863 100644 --- a/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp +++ b/src/Storages/ObjectStorage/StorageObjectStorageCluster.cpp @@ -836,4 +836,11 @@ void StorageObjectStorageCluster::onActionLockRemove(StorageActionBlockType acti IStorageCluster::onActionLockRemove(action_type); } +bool StorageObjectStorageCluster::prefersLargeBlocks() const +{ + if (pure_storage) + return pure_storage->prefersLargeBlocks(); + return IStorageCluster::prefersLargeBlocks(); +} + } diff --git a/src/Storages/ObjectStorage/StorageObjectStorageCluster.h b/src/Storages/ObjectStorage/StorageObjectStorageCluster.h index 9a442ed572bf..05e226b0140b 100644 --- a/src/Storages/ObjectStorage/StorageObjectStorageCluster.h +++ b/src/Storages/ObjectStorage/StorageObjectStorageCluster.h @@ -122,6 +122,8 @@ class StorageObjectStorageCluster : public IStorageCluster void onActionLockRemove(StorageActionBlockType action_type) override; + bool prefersLargeBlocks() const override; + private: void updateQueryToSendIfNeeded( ASTPtr & query,