Todd Lipcon has posted comments on this change. Change subject: consensus: Get rid of LockFor*() methods ......................................................................
Patch Set 8: (3 comments) http://gerrit.cloudera.org:8080/#/c/7012/8/src/kudu/consensus/raft_consensus.cc File src/kudu/consensus/raft_consensus.cc: PS8, Line 718: Unable to lock consensus for term change this message could be updated now Line 1435: ThreadRestrictions::AssertWaitAllowed(); seems like everywhere you take the lock, you are using AssertWaitAllowed. Would it be easier to just do something like: class MaybeSlowLock : public Mutex { public: void Lock() { AssertWaitAllowed(); Mutex::Lock(); } }; so that you don't have to do it everywhere? http://gerrit.cloudera.org:8080/#/c/7012/8/src/kudu/consensus/raft_consensus.h File src/kudu/consensus/raft_consensus.h: PS8, Line 479: Status CheckActiveLeaderUnlocked() const; this should probably also have WARN_UNUSED_RESULT -- 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: 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