Alexey Serbin has posted comments on this change.

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


Patch Set 10:

(7 comments)

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

PS10, Line 284: << "Replica is not in kInitialized state: "
nit: I would drop this part since it does not make the message more actionable.


PS10, Line 313:   }
              : 
              :   {
              :     ThreadRestrictions::AssertWaitAllowed();
              :     LockGuard l(lock_);
It seems this could be safely removed.


PS10, Line 1360: SnoozeFailureDetectorUnlocked()
What if it returns non-OK status?  Should that case be handled somehow?


PS10, Line 2120: UniqueLock
why not LockGuard?


PS10, Line 2424:   RETURN_NOT_OK(CheckActiveLeaderUnlocked());
               :   return Status::OK();
nit: this could be reduced to

  return CheckActiveLeaderUnlocked();


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

PS10, Line 225: using UniqueLock = std::unique_lock<simple_spinlock>;
I found only one place which uses the UniqueLock in the .cc file, and I'm not 
sure that's necessary.  Consider dropping this.


PS10, Line 469: operation
message?


-- 
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: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <[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

Reply via email to