Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12239 )
Change subject: [fs]: delete the (orphaned) metadata file when repairing ...................................................................... [fs]: delete the (orphaned) metadata file when repairing With KUDU-2636 fixed, we now support deleting dead containers at runtime. Because this involves deleting a pair of files, there's a time window in which it's possible for there to be just one file. A well-timed crash or kill -9 can make this a permanent state that fails the log block manager at startup. Indeed, a loop of dense_node-itest failed 2/1000 times in this way. This patch fixes the problem by detecting "orphaned" metadata files at startup and deleting them. A metadata file is orphaned if it has no corresponding data file and if it contains nothing but dead blocks. Change-Id: I2a4223d0e6385a7f7776f8fe2679a3bb16d832ab Reviewed-on: http://gerrit.cloudera.org:8080/12239 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/fs/log_block_manager-test.cc M src/kudu/fs/log_block_manager.cc 2 files changed, 349 insertions(+), 29 deletions(-) Approvals: Adar Dembo: Looks good to me, approved; Verified Kudu Jenkins: Verified -- 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: merged Gerrit-Change-Id: I2a4223d0e6385a7f7776f8fe2679a3bb16d832ab Gerrit-Change-Number: 12239 Gerrit-PatchSet: 9 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]>
