Hello David Ribeiro Alves, Mike Percy,

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

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

to review the following change.

Change subject: consensus: split ReplicaState in twain[1]
......................................................................

consensus: split ReplicaState in twain[1]

Following on the previous refactor, this splits out the parts of the
ReplicaState class that deal with pending consensus rounds into a new
PendingRounds class.

The change is mostly mechanical. The new class is made non-thread-safe
and we still use the synchronization of the ReplicaState class to
protect it. Since all of the methods dealing with pending rounds were
already 'Unlocked', this should be safe. The goal is to later make the
synchronization more fine-grained.

To that end, all of the methods were renamed to remove the 'Unlocked'
suffix.

There were several places in RaftConsensus which were using the
committed index/term tracked by PendingRounds, but it seems plausible
that these would be better tracked elsewhere. I left TODOs to deal with
this rather than making non-mechanical changes in this patch.

[1] https://www.youtube.com/watch?v=ZXRb6nPcx10

Change-Id: I95308ae8a5d65ada016ae08e0e8cf06c54b35909
---
M src/kudu/consensus/raft_consensus.cc
M src/kudu/consensus/raft_consensus.h
M src/kudu/consensus/raft_consensus_quorum-test.cc
M src/kudu/consensus/raft_consensus_state.cc
M src/kudu/consensus/raft_consensus_state.h
5 files changed, 282 insertions(+), 281 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95308ae8a5d65ada016ae08e0e8cf06c54b35909
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>

Reply via email to