Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8338 )
Change subject: log block manager: return early if read-only ...................................................................... log block manager: return early if read-only A container may be used for multiple block transactions, and when any transaction is committed, the blocks in that transaction are closed. If blocks in a container fail to close, the container is marked read-only, as this may cause on-disk inconsistencies. If there are multiple transactions affecting the same container, a container may be marked read-only by one transaction while still being written to by another, leading to a DCHECK failure. This patch changes this by storing a Status to indicate read-only instead of an AtomicBool. Functions that previously DCHECKed the container was not read-only now return early with the stored error and appropriate error-handling. Additionally, a couple of checks for read-only have been moved out of the blocks and into to the containers themselves. A test is added that shares a single container among multiple transactions, injects failure in one, and ensures the failure is visible across the other transactions. Change-Id: I06412a36ed62fe1e3a2307a4a2e7a0a7e3d65702 Reviewed-on: http://gerrit.cloudera.org:8080/8338 Reviewed-by: Adar Dembo <a...@cloudera.com> Reviewed-by: Hao Hao <hao....@cloudera.com> Tested-by: Adar Dembo <a...@cloudera.com> --- M src/kudu/fs/log_block_manager-test.cc M src/kudu/fs/log_block_manager.cc M src/kudu/fs/log_block_manager.h 3 files changed, 123 insertions(+), 44 deletions(-) Approvals: Adar Dembo: Looks good to me, approved; Verified Hao Hao: Looks good to me, but someone else must approve -- To view, visit http://gerrit.cloudera.org:8080/8338 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I06412a36ed62fe1e3a2307a4a2e7a0a7e3d65702 Gerrit-Change-Number: 8338 Gerrit-PatchSet: 6 Gerrit-Owner: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>