You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2017/06/27 04:06:33 UTC

kudu git commit: consensus: Don't mark dirty when clearing the leader UUID

Repository: kudu
Updated Branches:
  refs/heads/master ab07952fb -> 52e63d8aa


consensus: Don't mark dirty when clearing the leader UUID

There is no reason to mark the tablet dirty when clearing the leader
UUID. We only need to do that when we have a new leader. This is also
required to implement tombstoned voting.

Change-Id: Id2e3541c1970b253492a3493078dc5deeca63a29
Reviewed-on: http://gerrit.cloudera.org:8080/7193
Reviewed-by: David Ribeiro Alves <da...@gmail.com>
Tested-by: Mike Percy <mp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/52e63d8a
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/52e63d8a
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/52e63d8a

Branch: refs/heads/master
Commit: 52e63d8aaad5b5c4b58f819eb3569e7094a1b0f0
Parents: ab07952
Author: Mike Percy <mp...@apache.org>
Authored: Wed Jun 14 16:28:40 2017 -0700
Committer: Mike Percy <mp...@apache.org>
Committed: Tue Jun 27 03:27:50 2017 +0000

----------------------------------------------------------------------
 src/kudu/consensus/raft_consensus.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/52e63d8a/src/kudu/consensus/raft_consensus.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/raft_consensus.cc b/src/kudu/consensus/raft_consensus.cc
index d50bf9a..6f357e1 100644
--- a/src/kudu/consensus/raft_consensus.cc
+++ b/src/kudu/consensus/raft_consensus.cc
@@ -2618,7 +2618,7 @@ bool RaftConsensus::HasLeaderUnlocked() const {
 
 void RaftConsensus::ClearLeaderUnlocked() {
   DCHECK(lock_.is_locked());
-  SetLeaderUuidUnlocked("");
+  cmeta_->set_leader_uuid("");
 }
 
 const bool RaftConsensus::HasVotedCurrentTermUnlocked() const {