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 <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
