This is an automated email from the ASF dual-hosted git repository.
junchao pushed a commit to branch poe_fix
in repository https://gitbox.apache.org/repos/asf/incubator-resilientdb.git
The following commit(s) were added to refs/heads/poe_fix by this push:
new 3560ef73 change reponse num for poe
3560ef73 is described below
commit 3560ef73730ecc24b15e8c57b453d67fb8f7ad33
Author: Ubuntu <[email protected]>
AuthorDate: Wed Jan 21 04:55:12 2026 +0000
change reponse num for poe
---
.../ordering/common/framework/performance_manager.cpp | 2 +-
.../consensus/ordering/pbft/checkpoint_manager_test.cpp | 12 ++++++++----
platform/consensus/ordering/pbft/commitment_test.cpp | 3 ++-
platform/consensus/ordering/pbft/query_test.cpp | 3 ++-
platform/consensus/ordering/poe/framework/consensus.cpp | 17 +++++++----------
platform/consensus/ordering/poe/framework/consensus.h | 1 -
6 files changed, 20 insertions(+), 18 deletions(-)
diff --git
a/platform/consensus/ordering/common/framework/performance_manager.cpp
b/platform/consensus/ordering/common/framework/performance_manager.cpp
index a2417132..ebaf1d6a 100644
--- a/platform/consensus/ordering/common/framework/performance_manager.cpp
+++ b/platform/consensus/ordering/common/framework/performance_manager.cpp
@@ -70,7 +70,7 @@ PerformanceManager::~PerformanceManager() {
int PerformanceManager::GetPrimary() { return primary_; }
int PerformanceManager::NeedResponse() {
- return config_.GetMinClientReceiveNum(); // f+1;
+ return config_.GetMinClientReceiveNum(); // f+1;
}
std::unique_ptr<Request> PerformanceManager::GenerateUserRequest() {
diff --git a/platform/consensus/ordering/pbft/checkpoint_manager_test.cpp
b/platform/consensus/ordering/pbft/checkpoint_manager_test.cpp
index 0f7ebc88..e13746c4 100644
--- a/platform/consensus/ordering/pbft/checkpoint_manager_test.cpp
+++ b/platform/consensus/ordering/pbft/checkpoint_manager_test.cpp
@@ -108,7 +108,8 @@ class CheckPointManagerTest : public Test {
TEST_F(CheckPointManagerTest, SendCheckPoint) {
config_.SetViewchangeCommitTimeout(100);
SystemInfo sys_info;
- CheckPointManager manager(config_, &replica_communicator_, nullptr,
&sys_info);
+ CheckPointManager manager(config_, &replica_communicator_, nullptr,
+ &sys_info);
for (int i = 1; i <= 5; ++i) {
std::unique_ptr<Request> request = std::make_unique<Request>();
@@ -135,7 +136,8 @@ TEST_F(CheckPointManagerTest, SendCheckPointOnce) {
}));
SystemInfo sys_info;
- CheckPointManager manager(config_, &replica_communicator_, nullptr,
&sys_info);
+ CheckPointManager manager(config_, &replica_communicator_, nullptr,
+ &sys_info);
for (int i = 1; i <= 5; ++i) {
std::unique_ptr<Request> request = std::make_unique<Request>();
request->set_seq(i);
@@ -163,7 +165,8 @@ TEST_F(CheckPointManagerTest, SendCheckPointTwo) {
}));
SystemInfo sys_info;
- CheckPointManager manager(config_, &replica_communicator_, nullptr,
&sys_info);
+ CheckPointManager manager(config_, &replica_communicator_, nullptr,
+ &sys_info);
std::unique_ptr<Request> request = std::make_unique<Request>();
for (int i = 1; i <= 5; ++i) {
std::unique_ptr<Request> request = std::make_unique<Request>();
@@ -261,7 +264,8 @@ TEST_F(CheckPointManagerTest, Votes) {
std::future<bool> propose_done_future = propose_done.get_future();
SystemInfo sys_info;
- CheckPointManager manager(config_, &replica_communicator_, &mock_verifier,
&sys_info);
+ CheckPointManager manager(config_, &replica_communicator_, &mock_verifier,
+ &sys_info);
EXPECT_CALL(replica_communicator_, BroadCast)
.WillRepeatedly(Invoke([&](const google::protobuf::Message& message) {
for (int i = 1; i <= 3; ++i) {
diff --git a/platform/consensus/ordering/pbft/commitment_test.cpp
b/platform/consensus/ordering/pbft/commitment_test.cpp
index 156362e6..8ca54fe6 100644
--- a/platform/consensus/ordering/pbft/commitment_test.cpp
+++ b/platform/consensus/ordering/pbft/commitment_test.cpp
@@ -58,7 +58,8 @@ class CommitmentTest : public Test {
global_stats_(Stats::GetGlobalStats(1)),
config_(GenerateConfig()),
system_info_(config_),
- checkpoint_manager_(config_, &replica_communicator_, &verifier_,
&system_info_),
+ checkpoint_manager_(config_, &replica_communicator_, &verifier_,
+ &system_info_),
message_manager_(std::make_unique<MessageManager>(
config_, nullptr, &checkpoint_manager_, &system_info_)),
commitment_(
diff --git a/platform/consensus/ordering/pbft/query_test.cpp
b/platform/consensus/ordering/pbft/query_test.cpp
index b8639c6f..09056b87 100644
--- a/platform/consensus/ordering/pbft/query_test.cpp
+++ b/platform/consensus/ordering/pbft/query_test.cpp
@@ -59,7 +59,8 @@ class QueryTest : public Test {
: global_stats_(Stats::GetGlobalStats(1)),
config_(GenerateConfig()),
system_info_(config_),
- checkpoint_manager_(config_, &replica_communicator_, nullptr,
&system_info_),
+ checkpoint_manager_(config_, &replica_communicator_, nullptr,
+ &system_info_),
message_manager_(config_, nullptr, &checkpoint_manager_,
&system_info_),
recovery_(config_, &checkpoint_manager_, &system_info_, nullptr),
query_(config_, &recovery_),
diff --git a/platform/consensus/ordering/poe/framework/consensus.cpp
b/platform/consensus/ordering/poe/framework/consensus.cpp
index ea0a370e..955c34ea 100644
--- a/platform/consensus/ordering/poe/framework/consensus.cpp
+++ b/platform/consensus/ordering/poe/framework/consensus.cpp
@@ -27,26 +27,23 @@
namespace resdb {
namespace poe {
-
std::unique_ptr<PoEPerformanceManager> Consensus::GetPerformanceManager() {
- return config_.IsPerformanceRunning()
- ? std::make_unique<PoEPerformanceManager>(
- config_, GetBroadCastClient(), GetSignatureVerifier())
- : nullptr;
+ return config_.IsPerformanceRunning()
+ ? std::make_unique<PoEPerformanceManager>(
+ config_, GetBroadCastClient(), GetSignatureVerifier())
+ : nullptr;
}
-
Consensus::Consensus(const ResDBConfig& config,
std::unique_ptr<TransactionManager> executor)
: common::Consensus(config, std::move(executor)) {
int total_replicas = config_.GetReplicaNum();
int f = (total_replicas - 1) / 3;
-
if (config_.GetPublicKeyCertificateInfo()
- .public_key()
- .public_key_info()
- .type() == CertificateKeyInfo::CLIENT) {
+ .public_key()
+ .public_key_info()
+ .type() == CertificateKeyInfo::CLIENT) {
SetPerformanceManager(GetPerformanceManager());
}
diff --git a/platform/consensus/ordering/poe/framework/consensus.h
b/platform/consensus/ordering/poe/framework/consensus.h
index 003c5fa4..0a857ada 100644
--- a/platform/consensus/ordering/poe/framework/consensus.h
+++ b/platform/consensus/ordering/poe/framework/consensus.h
@@ -44,7 +44,6 @@ class Consensus : public common::Consensus {
std::unique_ptr<PoEPerformanceManager> GetPerformanceManager();
-
protected:
std::unique_ptr<PoE> poe_;
Stats* global_stats_;