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/05/27 19:53:43 UTC

kudu git commit: raft_consensus: don't call LogPrefix() if couldn't lock ReplicaState

Repository: kudu
Updated Branches:
  refs/heads/master 41e2b71c2 -> 314c9d8c1


raft_consensus: don't call LogPrefix() if couldn't lock ReplicaState

The other two notification calls use LogPrefixThreadSafe() if they can't
acquire the ReplicaState lock; this one should too.

Change-Id: Ibda7c723c773ec3cb0720c0c50c5b4af95dc3828
Reviewed-on: http://gerrit.cloudera.org:8080/7005
Reviewed-by: Mike Percy <mp...@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 314c9d8c102118dda6879eee538e2bb32d18ecd1
Parents: 41e2b71
Author: Adar Dembo <ad...@cloudera.com>
Authored: Fri May 26 19:02:11 2017 -0700
Committer: Mike Percy <mp...@apache.org>
Committed: Sat May 27 19:53:29 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/314c9d8c/src/kudu/consensus/raft_consensus.cc
----------------------------------------------------------------------
diff --git a/src/kudu/consensus/raft_consensus.cc b/src/kudu/consensus/raft_consensus.cc
index 4c60664..062acb5 100644
--- a/src/kudu/consensus/raft_consensus.cc
+++ b/src/kudu/consensus/raft_consensus.cc
@@ -648,7 +648,7 @@ void RaftConsensus::NotifyCommitIndex(int64_t commit_index) {
   ReplicaState::UniqueLock lock;
   Status s = state_->LockForCommit(&lock);
   if (PREDICT_FALSE(!s.ok())) {
-    LOG_WITH_PREFIX(WARNING)
+    LOG(WARNING) << state_->LogPrefixThreadSafe()
         << "Unable to take state lock to update committed index: "
         << s.ToString();
     return;