Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/12239 )
Change subject: [fs]: delete the (orphaned) metadata file when repairing ...................................................................... Patch Set 6: (5 comments) http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc File src/kudu/fs/log_block_manager.cc: http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc@768 PS6, Line 768: // |DATA\METADATA| NONE EXIST | EXIST && < MIN | EXIST && NO LIVE BLOCKS | EXIST && LIVE BLOCKS| I think it may be better to move this explanation to L546. http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc@772 PS6, Line 772: OK Not sure why not auto repair this case as well? http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc@830 PS6, Line 830: metadata_size Since based on the current logic, metadata_size is 0 when the metada file does not exist, this condition covers not only empty metadata file + zero data size, but also for missing metadata file + zero data size? If so, could you please update the comment above? Also, it would be more clear to use 's_meta.IsNotFound()' for checking missing metadata file. Same for 'Same for data_size==0'. http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc@840 PS6, Line 840: quick check whether there is no live blocks nit: quickly check whether or not there is any live blocks. http://gerrit.cloudera.org:8080/#/c/12239/6/src/kudu/fs/log_block_manager.cc@867 PS6, Line 867: orphaned metadata file nit: orphaned metadata file with no live blocks. -- To view, visit http://gerrit.cloudera.org:8080/12239 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2a4223d0e6385a7f7776f8fe2679a3bb16d832ab Gerrit-Change-Number: 12239 Gerrit-PatchSet: 6 Gerrit-Owner: helifu <hzhel...@corp.netease.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: helifu <hzhel...@corp.netease.com> Gerrit-Comment-Date: Thu, 24 Jan 2019 06:06:20 +0000 Gerrit-HasComments: Yes