From 933cd0a49137a12c150fc3dbc7e4cbab7a5188c7 Mon Sep 17 00:00:00 2001 From: liguohao <948193394@qq.com> Date: Tue, 14 Nov 2023 07:22:23 +0000 Subject: [PATCH] change set leader --- src/client/replication_ddl_client.cpp | 2 +- src/test/function_test/utils/test_util.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/replication_ddl_client.cpp b/src/client/replication_ddl_client.cpp index 0fcf7537f1..a3d5a9c763 100644 --- a/src/client/replication_ddl_client.cpp +++ b/src/client/replication_ddl_client.cpp @@ -91,6 +91,7 @@ replication_ddl_client::replication_ddl_client(const std::vector LOG_WARNING("duplicate adress {}", m); } } + set_meta_servers_leader(); } replication_ddl_client::~replication_ddl_client() { _tracker.cancel_outstanding_tasks(); } @@ -1103,7 +1104,6 @@ dsn::error_code replication_ddl_client::add_backup_policy(const std::string &pol error_with replication_ddl_client::backup_app( int32_t app_id, const std::string &backup_provider_type, const std::string &backup_path) { - set_meta_servers_leader(); auto req = std::make_unique(); req->app_id = app_id; req->backup_provider_type = backup_provider_type; diff --git a/src/test/function_test/utils/test_util.cpp b/src/test/function_test/utils/test_util.cpp index ab1a468f9a..146120d919 100644 --- a/src/test/function_test/utils/test_util.cpp +++ b/src/test/function_test/utils/test_util.cpp @@ -76,7 +76,6 @@ void test_util::SetUp() ddl_client_ = std::make_shared(meta_list_); ASSERT_TRUE(ddl_client_ != nullptr); - ddl_client_->set_meta_servers_leader(); ddl_client_->set_max_wait_app_ready_secs(120); dsn::error_code ret =