You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2017/06/29 00:31:31 UTC

[kudu-CR] raft consensus: failure detector doesn't need external synchronization

Hello Mike Percy,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/7329

to review the following change.

Change subject: raft_consensus: failure detector doesn't need external synchronization
......................................................................

raft_consensus: failure detector doesn't need external synchronization

While working with TimerFailureDetector I saw that it's thread-safe
through and through. Thus, RaftConsensus doesn't need to externally
synchronize it. So I renamed some functions and removed a few lock
acquisition sites.

AFAICT, the only reason not to do this is for one of the overloads of
SnoozeFailureDetector() which calls LOG_WITH_PREFIX_UNLOCKED(). I don't
think that's useful enough to warrant the locking, though.

Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
2 files changed, 29 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/29/7329/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7329
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Mike Percy <mp...@apache.org>

[kudu-CR] raft consensus: failure detector doesn't need external synchronization

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has posted comments on this change.

Change subject: raft_consensus: failure detector doesn't need external synchronization
......................................................................


Patch Set 1: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7329
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] raft consensus: failure detector doesn't need external synchronization

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: raft_consensus: failure detector doesn't need external synchronization
......................................................................


Patch Set 1: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7329
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] raft consensus: failure detector doesn't need external synchronization

Posted by "Mike Percy (Code Review)" <ge...@cloudera.org>.
Mike Percy has submitted this change and it was merged.

Change subject: raft_consensus: failure detector doesn't need external synchronization
......................................................................


raft_consensus: failure detector doesn't need external synchronization

While working with TimerFailureDetector I saw that it's thread-safe
through and through. Thus, RaftConsensus doesn't need to externally
synchronize it. So I renamed some functions and removed a few lock
acquisition sites.

AFAICT, the only reason not to do this is for one of the overloads of
SnoozeFailureDetector() which calls LOG_WITH_PREFIX_UNLOCKED(). I don't
think that's useful enough to warrant the locking, though.

Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
Reviewed-on: http://gerrit.cloudera.org:8080/7329
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mp...@apache.org>
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
2 files changed, 29 insertions(+), 35 deletions(-)

Approvals:
  Mike Percy: Looks good to me, approved
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/7329
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I637030c3ae2470aa0a8e1067ac6a9b69ea1793b4
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>