Mike Percy has posted comments on this change. Change subject: KUDU-871 (part 1). Refactor to make cmeta a first class object ......................................................................
Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/6957/1//COMMIT_MSG Commit Message: PS1, Line 16: 1) Allow RaftConsensus to operate while not initialized or in a shutdown : state. Also pass ConsensusMetadata into the RaftConsensus : constructor. > not 100% following this. The problem is that I need to provide a long lived object (see patch 3 in this series) in order to avoid racy handling of the ConsensusMetadata by TabletCopy / tombstoned voting for example. The long lived object I chose was ConsensusMetadata because making both TabletReplica and RaftConsensus immortal is a much bigger change. The compromise I landed on was ensuring that TabletReplica and RaftConsensus were always alive, however they would be replaced on TabletCopy. So the only immortal things end up being TabletMetadata and ConsensusMetadata. The upshot is that we always get a RaftConsensus object whenever we have a TabletReplica object, but we don't have to support a cyclical lifecycle DAG on either object (going from Shutdown() -> Init() -> Start()) PS1, Line 41: * Add additional lifecycle runtime assertions in TabletReplica and : RaftConsensus. > Can you also clearly document the lifecycle for RaftConsensus? I'm not enti The RaftConsensus::Shutdown() is similar to what it was before but you make a fair point that since RaftConsensus isn't destroyed on TabletPeer::Shutdown() anymore then it should be as aggressive as possible reclaiming memory when it's shut down. I'll check on that. I tried to give a summary of the lifecycle in my above comment. Let me know if I need to clarify anything and I'll add more details as a comment in the next rev. -- To view, visit http://gerrit.cloudera.org:8080/6957 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia27a091d27b3996d37009d5ec866e744f9608388 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
