This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new da129c6d8 fix(duplication): use get_current_dup_cluster_name() instead 
of get_current_cluster_name() for duplication (#2033)
da129c6d8 is described below

commit da129c6d856f4ea700cea2939d22e645c92cb73b
Author: Dan Wang <[email protected]>
AuthorDate: Tue May 28 18:31:55 2024 +0800

    fix(duplication): use get_current_dup_cluster_name() instead of 
get_current_cluster_name() for duplication (#2033)
---
 src/meta/duplication/meta_duplication_service.cpp | 4 ++--
 src/meta/test/meta_duplication_service_test.cpp   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/meta/duplication/meta_duplication_service.cpp 
b/src/meta/duplication/meta_duplication_service.cpp
index 500a9987b..4c432736c 100644
--- a/src/meta/duplication/meta_duplication_service.cpp
+++ b/src/meta/duplication/meta_duplication_service.cpp
@@ -207,7 +207,7 @@ void 
meta_duplication_service::add_duplication(duplication_add_rpc rpc)
              remote_replica_count);
 
     LOG_WARNING_DUP_HINT_AND_RETURN_IF_NOT(request.remote_cluster_name !=
-                                               get_current_cluster_name(),
+                                               get_current_dup_cluster_name(),
                                            response,
                                            ERR_INVALID_PARAMETERS,
                                            "illegal operation: adding 
duplication to itself");
@@ -474,7 +474,7 @@ void 
meta_duplication_service::create_follower_app_for_duplication(
     // `kDuplicationEnvMasterClusterKey=>{master_cluster_name}`
     // `kDuplicationEnvMasterMetasKey=>{master_meta_list}`
     
request.options.envs.emplace(duplication_constants::kDuplicationEnvMasterClusterKey,
-                                 get_current_cluster_name());
+                                 get_current_dup_cluster_name());
     
request.options.envs.emplace(duplication_constants::kDuplicationEnvMasterMetasKey,
                                  _meta_svc->get_meta_list_string());
     
request.options.envs.emplace(duplication_constants::kDuplicationEnvMasterAppNameKey,
diff --git a/src/meta/test/meta_duplication_service_test.cpp 
b/src/meta/test/meta_duplication_service_test.cpp
index 78c0de661..0e0ed1f40 100644
--- a/src/meta/test/meta_duplication_service_test.cpp
+++ b/src/meta/test/meta_duplication_service_test.cpp
@@ -437,7 +437,7 @@ public:
              ERR_INVALID_PARAMETERS},
             // Duplicating to local cluster is not allowed.
             {kTestAppName,
-             get_current_cluster_name(),
+             get_current_dup_cluster_name(),
              true,
              kTestRemoteAppName,
              kTestRemoteReplicaCount,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to