From b513f1d4567904e58bfc24b26cbf0c9f7ec32d4f Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 16 Feb 2024 18:27:22 +0100 Subject: [PATCH] fix build --- src/Databases/DatabaseOrdinary.cpp | 6 +++--- src/Storages/StorageReplicatedMergeTree.h | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Databases/DatabaseOrdinary.cpp b/src/Databases/DatabaseOrdinary.cpp index e3da0c6988b9..2b2c1377e98c 100644 --- a/src/Databases/DatabaseOrdinary.cpp +++ b/src/Databases/DatabaseOrdinary.cpp @@ -72,9 +72,9 @@ static void setReplicatedEngine(ASTCreateQuery * create_query, ContextPtr contex auto * storage = create_query->storage; /// Get replicated engine - const auto & config = context->getConfigRef(); - String replica_path = StorageReplicatedMergeTree::getDefaultZooKeeperPath(config); - String replica_name = StorageReplicatedMergeTree::getDefaultReplicaName(config); + const auto & server_settings = args.getContext()->getServerSettings(); + String replica_path = server_settings.default_replica_path; + String replica_name = server_settings.default_replica_name; auto args = std::make_shared(); args->children.push_back(std::make_shared(replica_path)); diff --git a/src/Storages/StorageReplicatedMergeTree.h b/src/Storages/StorageReplicatedMergeTree.h index 92a147b9d068..d36c9f804569 100644 --- a/src/Storages/StorageReplicatedMergeTree.h +++ b/src/Storages/StorageReplicatedMergeTree.h @@ -232,14 +232,6 @@ class StorageReplicatedMergeTree final : public MergeTreeData /// Checks ability to use granularity bool canUseAdaptiveGranularity() const override; - /// Returns the default path to the table in ZooKeeper. - /// It's used if not set in engine's arguments while creating a replicated table. - static String getDefaultReplicaPath(const ContextPtr & context_); - - /// Returns the default replica name in ZooKeeper. - /// It's used if not set in engine's arguments while creating a replicated table. - static String getDefaultReplicaName(const ContextPtr & context_); - /// Modify a CREATE TABLE query to make a variant which must be written to a backup. void adjustCreateQueryForBackup(ASTPtr & create_query) const override;