David Ribeiro Alves has posted comments on this change. Change subject: Create ConsensusMetadataService ......................................................................
Patch Set 2: (17 comments) http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/consensus/consensus_meta_service-test.cc File src/kudu/consensus/consensus_meta_service-test.cc: PS2, Line 31: ConsensusMetadataServiceTest how does overwrite behave? is it allowed? likely should have a test. PS2, Line 38: OVERRIDE use c++11 style overrides PS2, Line 68: ASSERT_OK(cmeta_service_->Load(kTabletId, &cmeta)); no testing that it matches what you expect? http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/consensus/consensus_meta_service.cc File src/kudu/consensus/consensus_meta_service.cc: PS2, Line 42: RETURN_NOT_OK(ConsensusMetadata::Create(fs_manager_, tablet_id, fs_manager_->uuid(), : config, current_term, cmeta_out)); is it strictly necessary to do the create under the lock? http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/consensus/consensus_meta_service.h File src/kudu/consensus/consensus_meta_service.h: PS2, Line 33: ConsensusMetadataService class header doc PS2, Line 39: // On success, returns OK. nit: we generally omit this (otherwise all the methods would have to have it) PS2, Line 51: // Delete the ConsensusMetadata instance keyed by 'tablet_id'. is the delete permanent, or do we leave something lying around? can you talk a bit about that? PS2, Line 53: // Returns an error if the cmeta instance exists but cannot be deleted. why wouldn't we be able to delete it? http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/consensus/raft_consensus_quorum-test.cc File src/kudu/consensus/raft_consensus_quorum-test.cc: PS2, Line 575: nit no longer need to leave this space http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/integration-tests/tablet_copy-itest.cc File src/kudu/integration-tests/tablet_copy-itest.cc: PS2, Line 56: using kudu::consensus::ConsensusMetadataService; nit: "consensus" goes after "client" :) http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tablet/tablet_bootstrap.cc File src/kudu/tablet/tablet_bootstrap.cc: Line 78: spurious change PS2, Line 169: meta consider renaming this param to "tablet_meta" http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tablet/tablet_replica-test.cc File src/kudu/tablet/tablet_replica-test.cc: PS2, Line 24: #include "kudu/common/wire_protocol.h" interesting, I'd think this one came before the one above, but apparently not http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tserver/tablet_copy_client.cc File src/kudu/tserver/tablet_copy_client.cc: PS2, Line 104: cmeta_service_(std::move(cmeta_service)), I see you're using move there but const refs elsewhere? any particular reason? http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tserver/tablet_copy_client.h File src/kudu/tserver/tablet_copy_client.h: PS2, Line 74: scoped_refptr use const ref http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tserver/ts_tablet_manager.cc File src/kudu/tserver/ts_tablet_manager.cc: PS2, Line 1067: const scoped_refptr<consensus::ConsensusMetadataService>& if you don't need to increase the refcount consider passing a raw pointer http://gerrit.cloudera.org:8080/#/c/7191/2/src/kudu/tserver/ts_tablet_manager.h File src/kudu/tserver/ts_tablet_manager.h: PS2, Line 289: const does the const server a purpose here? -- To view, visit http://gerrit.cloudera.org:8080/7191 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia30c05dd0feec2b7530205f4d17dfc079a1c3451 Gerrit-PatchSet: 2 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: Tidy Bot Gerrit-HasComments: Yes