helifu has posted comments on this change. ( http://gerrit.cloudera.org:8080/12075 )
Change subject: KUDU-2636: LBM supports deleting dead and full containers ...................................................................... Patch Set 5: (5 comments) http://gerrit.cloudera.org:8080/#/c/12075/4/src/kudu/fs/log_block_manager.cc File src/kudu/fs/log_block_manager.cc: http://gerrit.cloudera.org:8080/#/c/12075/4/src/kudu/fs/log_block_manager.cc@1979 PS4, Line 1979: for (auto& name : names) { > Maybe define a helper function like this? done. this comment was previously blocked by the following question, but now it is ok. http://gerrit.cloudera.org:8080/#/c/12075/4/src/kudu/fs/log_block_manager.cc@1980 PS4, Line 1980: string data_file_name = StrCat(name, kContainerDataFileSuffix); > Looks like you missed this. Done http://gerrit.cloudera.org:8080/#/c/12075/4/src/kudu/fs/log_block_manager.cc@1983 PS4, Line 1983: file_cache_.Invalidate(metadata_file_name); : WARN_NOT_OK_LBM_DISK_FAILURE(env_->DeleteFi > That's true, but the call to RemoveFullContainersUnlocked on L1975 will hav ah,i can catch up with you at last. yes, you are correct! i made a mistake earlier.the key point is std::weak_ptr. the file_cache_.DeleteFile is safe here. but the logic is a little complicated indeed :( http://gerrit.cloudera.org:8080/#/c/12075/5/src/kudu/fs/log_block_manager.cc File src/kudu/fs/log_block_manager.cc: http://gerrit.cloudera.org:8080/#/c/12075/5/src/kudu/fs/log_block_manager.cc@1237 PS5, Line 1237: // Due to the shared ownership of LogBlockDeletionTransaction, the : // destructor is responsible for destroying all registered blocks. : // This includes: : // 1. Punching holes in deleted blocks, and : // 2. Deleting dead containers outright. > There's something wrong here with the formatting; looks like there's an ext Done http://gerrit.cloudera.org:8080/#/c/12075/5/src/kudu/fs/log_block_manager.cc@1632 PS5, Line 1632: log_block_.reset(); : if (container_->metrics()) { : container_->metrics()->generic_metrics.blocks_open_reading->Decrement(); : } > I think this may be the source of the TSAN data race. Great job! Done. -- To view, visit http://gerrit.cloudera.org:8080/12075 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7d3672ae3c3dd9acd489120d653c44a641537f10 Gerrit-Change-Number: 12075 Gerrit-PatchSet: 5 Gerrit-Owner: helifu <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: helifu <[email protected]> Gerrit-Comment-Date: Wed, 19 Dec 2018 04:15:40 +0000 Gerrit-HasComments: Yes
