You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by zh...@apache.org on 2021/12/24 04:05:04 UTC

[incubator-pegasus] branch master updated: fix: fix compile error produced by dist/common.h (#860)

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

zhaoliwei 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 77ad583  fix: fix compile error produced by dist/common.h (#860)
77ad583 is described below

commit 77ad583db330273953ea615e1f20620582d69d2d
Author: levy5307 <zl...@163.com>
AuthorDate: Fri Dec 24 12:04:54 2021 +0800

    fix: fix compile error produced by dist/common.h (#860)
---
 rdsn                                      | 2 +-
 src/reporter/pegasus_counter_reporter.cpp | 4 ++--
 src/server/available_detector.cpp         | 4 ++--
 src/server/info_collector.cpp             | 4 ++--
 src/server/pegasus_write_service.h        | 4 ++--
 src/server/pegasus_write_service_impl.h   | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/rdsn b/rdsn
index 3b7756b..24bf381 160000
--- a/rdsn
+++ b/rdsn
@@ -1 +1 @@
-Subproject commit 3b7756b536ad2a4019df9ec77d318a5dfe0b6724
+Subproject commit 24bf38117d6e3076ee5910a8a0b1d3f368592516
diff --git a/src/reporter/pegasus_counter_reporter.cpp b/src/reporter/pegasus_counter_reporter.cpp
index 507fdd1..1e5b5ea 100644
--- a/src/reporter/pegasus_counter_reporter.cpp
+++ b/src/reporter/pegasus_counter_reporter.cpp
@@ -34,7 +34,7 @@
 #include <event2/keyvalq_struct.h>
 
 #include <dsn/cpp/service_app.h>
-#include <dsn/dist/replication/duplication_common.h>
+#include <dsn/dist/common.h>
 #include <dsn/dist/fmt_logging.h>
 #include <dsn/utility/flags.h>
 
@@ -137,7 +137,7 @@ void pegasus_counter_reporter::start()
 
     _app_name = dsn::service_app::current_service_app_info().full_name;
 
-    _cluster_name = dsn::replication::get_current_cluster_name();
+    _cluster_name = dsn::get_current_cluster_name();
 
     _last_report_time_ms = dsn_now_ms();
 
diff --git a/src/server/available_detector.cpp b/src/server/available_detector.cpp
index f19bf95..c39fadd 100644
--- a/src/server/available_detector.cpp
+++ b/src/server/available_detector.cpp
@@ -20,7 +20,7 @@
 #include "available_detector.h"
 
 #include <algorithm>
-#include <dsn/dist/replication/duplication_common.h>
+#include <dsn/dist/common.h>
 #include <dsn/utils/time_utils.h>
 #include <iomanip>
 #include <sstream>
@@ -46,7 +46,7 @@ available_detector::available_detector()
       _recent_minute_fail_times(0)
 {
     // initialize information for available_detector.
-    _cluster_name = dsn::replication::get_current_cluster_name();
+    _cluster_name = dsn::get_current_cluster_name();
     _app_name = dsn_config_get_value_string(
         "pegasus.collector", "available_detect_app", "", "available detector app name");
     dassert(_app_name.size() > 0, "");
diff --git a/src/server/info_collector.cpp b/src/server/info_collector.cpp
index 6de9b5f..3a569dc 100644
--- a/src/server/info_collector.cpp
+++ b/src/server/info_collector.cpp
@@ -24,7 +24,7 @@
 #include <vector>
 #include <chrono>
 #include <dsn/tool-api/group_address.h>
-#include <dsn/dist/replication/duplication_common.h>
+#include <dsn/dist/common.h>
 #include <dsn/dist/fmt_logging.h>
 
 #include "base/pegasus_const.h"
@@ -55,7 +55,7 @@ info_collector::info_collector()
         _meta_servers.group_address()->add(ms);
     }
 
-    _cluster_name = dsn::replication::get_current_cluster_name();
+    _cluster_name = dsn::get_current_cluster_name();
 
     _shell_context = std::make_shared<shell_context>();
     _shell_context->current_cluster_name = _cluster_name;
diff --git a/src/server/pegasus_write_service.h b/src/server/pegasus_write_service.h
index 6852a4c..6bc4de7 100644
--- a/src/server/pegasus_write_service.h
+++ b/src/server/pegasus_write_service.h
@@ -21,6 +21,7 @@
 
 #include <dsn/perf_counter/perf_counter_wrapper.h>
 #include <dsn/dist/replication/replica_base.h>
+#include <dsn/dist/common.h>
 #include <dsn/dist/replication/duplication_common.h>
 #include <dsn/dist/replication/replication_types.h>
 
@@ -34,8 +35,7 @@ namespace server {
 inline uint8_t get_current_cluster_id()
 {
     static const uint8_t cluster_id =
-        dsn::replication::get_duplication_cluster_id(dsn::replication::get_current_cluster_name())
-            .get_value();
+        dsn::replication::get_duplication_cluster_id(dsn::get_current_cluster_name()).get_value();
     return cluster_id;
 }
 
diff --git a/src/server/pegasus_write_service_impl.h b/src/server/pegasus_write_service_impl.h
index d4cc3f3..d0278dc 100644
--- a/src/server/pegasus_write_service_impl.h
+++ b/src/server/pegasus_write_service_impl.h
@@ -61,7 +61,7 @@ inline int get_cluster_id_if_exists()
     // cluster_id is 0 if not configured, which means it will accept writes
     // from any cluster as long as the timestamp is larger.
     static auto cluster_id_res =
-        dsn::replication::get_duplication_cluster_id(dsn::replication::get_current_cluster_name());
+        dsn::replication::get_duplication_cluster_id(dsn::get_current_cluster_name());
     static uint64_t cluster_id = cluster_id_res.is_ok() ? cluster_id_res.get_value() : 0;
     return cluster_id;
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org