From 201a7b8d5fc4b36b787c100ce251a14725bc613c Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri Date: Tue, 7 Nov 2023 14:06:55 +0800 Subject: [PATCH] fix --- src/Coordination/KeeperServer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Coordination/KeeperServer.cpp b/src/Coordination/KeeperServer.cpp index 63e270e1ca0..ef6a88cd141 100644 --- a/src/Coordination/KeeperServer.cpp +++ b/src/Coordination/KeeperServer.cpp @@ -1089,7 +1089,8 @@ bool KeeperServer::requestLeader() bool KeeperServer::yieldLeadership() { - return isLeader() && raft_instance->yield_leadership(); + if (isLeader()) + raft_instance->yield_leadership(); } void KeeperServer::recalculateStorageStats()