Mike Percy has submitted this change and it was merged. Change subject: KUDU-1377 (part 3): Ignore corrupted trailing records on LBM metadata ......................................................................
KUDU-1377 (part 3): Ignore corrupted trailing records on LBM metadata This patch causes the LogBlockManager to automatically detect and tolerate a trailing partial record in a container metadata file. Such an on-disk state can occur as a result of a crash or a failure to write a full record because a disk was full. If a container metadata file is detected to have a partial trailing record, that record is assumed to have been the result of a write-in-progress at the time of a fault. In such a case, it is safe to truncate this partial record because the write was not considered successful. The file is truncated at the offset where the partial record begins and a warning message is logged. After truncating the metadata file, the LogBlockManager continues appending records to that container metadata file beginning at the point at which the file was truncated. Adds a test that corrupts a LBC metadata file in various ways. Change-Id: I0b88ba051b390b6a2587eecdd205c478f1edccb4 Reviewed-on: http://gerrit.cloudera.org:8080/2595 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/fs/block_manager-test.cc M src/kudu/fs/log_block_manager.cc M src/kudu/fs/log_block_manager.h 3 files changed, 265 insertions(+), 56 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/2595 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b88ba051b390b6a2587eecdd205c478f1edccb4 Gerrit-PatchSet: 8 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]>
