From 64d54ff8a19491d33ee4fb2708441b3eb54b1922 Mon Sep 17 00:00:00 2001 From: Yongqiang YANG Date: Mon, 9 Sep 2024 17:20:08 +0800 Subject: [PATCH] fix --- be/src/cloud/config.cpp | 6 ++++++ be/src/cloud/config.h | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/be/src/cloud/config.cpp b/be/src/cloud/config.cpp index 03b58772df71d78..56b7a23cf489a2f 100644 --- a/be/src/cloud/config.cpp +++ b/be/src/cloud/config.cpp @@ -66,4 +66,10 @@ DEFINE_mBool(enable_new_tablet_do_compaction, "false"); DEFINE_Bool(enable_cloud_txn_lazy_commit, "false"); +void set_cloud_unique_id(std::string instance_id) { + if (cloud_unique_id.empty() && !instance_id.empty()) { + static_cast(set_config("cloud_unique_id", "1:" + instance_id + ":compute", true)); + } +} + } // namespace doris::config diff --git a/be/src/cloud/config.h b/be/src/cloud/config.h index 76a71088efa9979..50e44b639cd5834 100644 --- a/be/src/cloud/config.h +++ b/be/src/cloud/config.h @@ -30,11 +30,7 @@ static inline bool is_cloud_mode() { return deploy_mode == "disaggregated" || !cloud_unique_id.empty(); } -static inline void set_cloud_unique_id(std::string instance_id) { - if (cloud_unique_id.empty() && !instance_id.empty()) { - static_cast(set_config("cloud_unique_id", "1:" + instance_id + ":compute", true)); - } -} +void set_cloud_unique_id(std::string instance_id); // Set the endpoint of meta service. //