Mike Percy has submitted this change and it was merged. Change subject: Create ConsensusMetadataManager ......................................................................
Create ConsensusMetadataManager This patch creates an API for a class that manages consensus metadata. This abstracts out the management of ConsensusMetadata files, providing the following benefits: 1) An instance of this class can be plumbed throughout the various classes that deal with reading, creating, and modifying consensus metadata so that we don't have to pass the individual cmeta instances around. 2) It provides additional abstraction and flexibility that will make it easier to change the underlying implementation of ConsensusMetadata in the future as needed, perhaps if we wanted to make them log structured and group committed across all replicas on a tablet server. This patch also changes the contract of ConsensusMetadata::DeleteOnDiskData() to return NotFound if a nonexistent cmeta is deleted so that ConsensusMetadataManager::Delete() can provide that same contract, and modifies the single callsite (in TSTabletManager) to account for that change. Change-Id: Ia30c05dd0feec2b7530205f4d17dfc079a1c3451 Reviewed-on: http://gerrit.cloudera.org:8080/7191 Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <aser...@cloudera.com> --- M src/kudu/consensus/CMakeLists.txt M src/kudu/consensus/consensus_meta.cc M src/kudu/consensus/consensus_meta.h A src/kudu/consensus/consensus_meta_manager-stress-test.cc A src/kudu/consensus/consensus_meta_manager-test.cc A src/kudu/consensus/consensus_meta_manager.cc A src/kudu/consensus/consensus_meta_manager.h M src/kudu/consensus/raft_consensus.cc M src/kudu/consensus/raft_consensus_quorum-test.cc M src/kudu/integration-tests/tablet_copy-itest.cc M src/kudu/integration-tests/ts_recovery-itest.cc M src/kudu/master/sys_catalog.cc M src/kudu/master/sys_catalog.h M src/kudu/tablet/tablet_bootstrap-test.cc M src/kudu/tablet/tablet_bootstrap.cc M src/kudu/tablet/tablet_bootstrap.h M src/kudu/tablet/tablet_replica-test.cc M src/kudu/tablet/tablet_replica.cc M src/kudu/tablet/tablet_replica.h M src/kudu/tools/tool_action_local_replica.cc M src/kudu/tserver/tablet_copy_client-test.cc M src/kudu/tserver/tablet_copy_client.cc M src/kudu/tserver/tablet_copy_client.h M src/kudu/tserver/tablet_copy_source_session-test.cc M src/kudu/tserver/ts_tablet_manager.cc M src/kudu/tserver/ts_tablet_manager.h 26 files changed, 786 insertions(+), 210 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/7191 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia30c05dd0feec2b7530205f4d17dfc079a1c3451 Gerrit-PatchSet: 19 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> 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: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org>