Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/19519 )
Change subject: [LBM] append CREATE/DELETE records in batch to metadata ...................................................................... Patch Set 10: (1 comment) http://gerrit.cloudera.org:8080/#/c/19519/10/src/kudu/fs/log_block_manager.cc File src/kudu/fs/log_block_manager.cc: http://gerrit.cloudera.org:8080/#/c/19519/10/src/kudu/fs/log_block_manager.cc@2726 PS10, Line 2726: for (const auto& lb : clbs) { : VLOG(3) << "Deleting block " << lb->block_id(); : // TODO(yingchun): BlockDeleted in batch : container->BlockDeleted(lb); : } > It seems the TODO need to be done now. It's none of bussiness of this TODO, I guess you mean the TODO in L2733? The TODO here is suggest to wrap a function like 'BlocksDeleted(lbs)' When calling LogBlockManager::RemoveLogBlocks, it means that the 'block_ids' are not referenced by any tablets, the blocks can be removed safely, there are 3 steps to remove a block: 1. remove from memory (L2729) 2. append DELETE record to .metadata file (L2736) 3. remove and punch hole in .data file (out of LogBlockManager::RemoveLogBlocks, when LogBlockDeletionTransaction destructed) There is a little of inconsistency when 1 is done but 2 and 3 failed/skipped of the existed code, but it only influence the metrics. We can improve it by another patch. -- To view, visit http://gerrit.cloudera.org:8080/19519 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie24adab3b1dbbea55108a1f525093136fcf5a726 Gerrit-Change-Number: 19519 Gerrit-PatchSet: 10 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: KeDeng <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <[email protected]> Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Fri, 03 Mar 2023 08:14:01 +0000 Gerrit-HasComments: Yes
