Adar Dembo has posted comments on this change.

Change subject: consensus: Get rid of LockFor*() methods
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7012/8/src/kudu/consensus/raft_consensus.cc
File src/kudu/consensus/raft_consensus.cc:

Line 1435:     ThreadRestrictions::AssertWaitAllowed();
> Nah, we had them in the LockFor() calls.
My argument was more to do with our generic lock implementations; if 
RaftConsensus has its own spinlock with more restrictive assertions (and can 
guarantee that all of its threads meet those assertions), that's fine with me.

I think Todd's suggestion re: simple_spinlock is to subclass it as 
MaybeSlowLock and add the assertions there. Then it's easy to switch out the 
lock implementation from simple_spinlock to Mutex, and the generic spinlock 
implementation remains free of AssertWaitAllowed().


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6858752f4fbeb70b09eb4375c52e4aeaa1bb8e71
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to