Will Berkeley has uploaded this change for review. ( http://gerrit.cloudera.org:8080/10777
Change subject: KUDU-2260: Log block manager should handle null bytes in metadata on crash ...................................................................... KUDU-2260: Log block manager should handle null bytes in metadata on crash On ext4 with data=ordered (the default), it's possible for a write to persist an increase to the filesize without persisting the actual data. In this case, the file will contain null bytes at the end. In the LBM, we considered this case to be corruption if there were enough null bytes (>= 8) for a PB container record length and length checksum. However, it's safe to call this an incomplete record and truncate the file at the end of the last complete record. This patch changes the P container reader code to return Status::Incomplete if it encounters this situation. This will cause the LBM to repair the container metadata appropriately. Two regression tests, at the PB container file and LBM layers, are included. Change-Id: I0af5c9dbbe28afe7a179595ad20392b99cde2a1b --- M src/kudu/consensus/log_util.cc M src/kudu/fs/log_block_manager-test.cc M src/kudu/fs/log_block_manager.h M src/kudu/util/pb_util-test.cc M src/kudu/util/pb_util.cc M src/kudu/util/slice.cc M src/kudu/util/slice.h 7 files changed, 136 insertions(+), 51 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/10777/1 -- To view, visit http://gerrit.cloudera.org:8080/10777 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0af5c9dbbe28afe7a179595ad20392b99cde2a1b Gerrit-Change-Number: 10777 Gerrit-PatchSet: 1 Gerrit-Owner: Will Berkeley <[email protected]>
