Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-1793: only update lbm container bookkeeping on success ......................................................................
KUDU-1793: only update lbm container bookkeeping on success This patch reverts part of commit abea8c6 by moving some bookkeeping out of containers and into writable blocks, ensuring that the container's accounting structures are only modified when a block has been written successfully. Additionally, since the aforementioned bug shipped in Kudu 1.1.0, the LBM invariant of "all blocks are contiguous on disk" has been relaxed somewhat: if we encounter an unexpected "hole", we'll place the next block after it. The new test relies on Env fault injection to simulate out-of-disk-space errors. It triggered a crash 100% of the time without the fix. I also snuck in a change to relax the behavior of the LBM at startup if it encounters an unknown record type (for future-proofing), and changed several LOG(FATAL) callers to propagate a bad Status up the stack instead. Change-Id: I49bc98c9f8b7dce0333f88cec85757fe122acfa4 Reviewed-on: http://gerrit.cloudera.org:8080/5399 Tested-by: Adar Dembo <[email protected]> Reviewed-by: Todd Lipcon <[email protected]> --- M src/kudu/fs/block_manager-test.cc M src/kudu/fs/log_block_manager.cc M src/kudu/fs/log_block_manager.h M src/kudu/master/sys_catalog.cc M src/kudu/util/env.h M src/kudu/util/env_posix.cc 6 files changed, 242 insertions(+), 63 deletions(-) Approvals: Adar Dembo: Verified Todd Lipcon: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/5399 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49bc98c9f8b7dce0333f88cec85757fe122acfa4 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]>
