Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/8338


Change subject: WIP log block manager: return early if read-only
......................................................................

WIP log block manager: return early if read-only

====
WIP: may add more based on in-flight changes to LBM and block
transactions. Would appreciate feedback on the approach.
====

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.

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
---
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, 117 insertions(+), 41 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/8338/1
--
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: newchange
Gerrit-Change-Id: I06412a36ed62fe1e3a2307a4a2e7a0a7e3d65702
Gerrit-Change-Number: 8338
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>

Reply via email to