Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18152 )
Change subject: KUDU-3344: catalog manager clean up metadata for deleted tables/tablets ...................................................................... Patch Set 4: (8 comments) Thank you for the patch! I did quick first pass, this looks good -- just a few nits. http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/integration-tests/master-stress-test.cc File src/kudu/integration-tests/master-stress-test.cc: http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/integration-tests/master-stress-test.cc@161 PS4, Line 161: opts.extra_master_flags.emplace_back("--v=1"); Is this still needed? http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/integration-tests/ts_tablet_manager-itest.cc File src/kudu/integration-tests/ts_tablet_manager-itest.cc: http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/integration-tests/ts_tablet_manager-itest.cc@764 PS4, Line 764: GetAllTables nit: could this ever generate a gtest-related error? If not, then maybe remove NO_FATALS()? http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.h File src/kudu/master/catalog_manager.h: http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.h@775 PS4, Line 775: GetAllTablets nit: if this is a test-only method, maybe name it GetAllTabletsForTests() ? Also, consider moving this into the 'private' section and adding the test as a friend using the FRIEND_TEST macro? http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.h@1045 PS4, Line 1045: void ExtractDeletedTablesAndTablets(std::vector<scoped_refptr<TableInfo>>* deleted_tables, nit: do you mind adding a small comment for this method as for the rest ones around? http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.h@1139 PS4, Line 1139: Status ProcessDeletedTables(const std::vector<scoped_refptr<TableInfo>>& tables, : time_t current_timestamp); : Status ProcessDeletedTablets(const std::vector<scoped_refptr<TabletInfo>>& tablets, : time_t current_timestamp); nit: it's sort of self-obvious, but would be nice to add a few words to describe the essence of what these methods are for and when they are called http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.cc File src/kudu/master/catalog_manager.cc: http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/catalog_manager.cc@5208 PS4, Line 5208: TabletMetadataLock tablet_lock(tablet.get(), LockMode::READ); : TableMetadataLock table_lock(tablet->table().get(), LockMode::READ); Should the order of taking locks be reversed here? At least in ExtractTabletsToProcess() I see the order is different, so it might be a deadlock if not re-ordered. http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/master-test.cc File src/kudu/master/master-test.cc: http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/master-test.cc@2403 PS4, Line 2403: NO_FATALS nit here and below: could GetAllTables() generate any gtest error? If not, maybe remove NO_FATALS()? http://gerrit.cloudera.org:8080/#/c/18152/4/src/kudu/master/master-test.cc@2576 PS4, Line 2576: const char* kTableName nit: this might be constexpr const char* const kTableName -- To view, visit http://gerrit.cloudera.org:8080/18152 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idefa2ee2f5108ba913fe0057a4061c3c28351547 Gerrit-Change-Number: 18152 Gerrit-PatchSet: 4 Gerrit-Owner: Yifan Zhang <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: yejiabao <[email protected]> Gerrit-Comment-Date: Fri, 18 Feb 2022 06:07:46 +0000 Gerrit-HasComments: Yes
