Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/7374
to look at the new patch set (#17).
Change subject: log block manager: mark container as read-only after syncing
error
......................................................................
log block manager: mark container as read-only after syncing
error
Currently, container in-memory accounting is updated only after
metadata gets successfully fsync()ed. However, it is not safe to
do so, because the on-disk state may already contain partial or
complete data/metadata at this point.
For instance, suppose that SyncData() fails during Close() of
block A. Even though Close() itself will fail, it's possible
that block A's metadata was successfully written out to disk.
Some Kudu operations (e.g. merge compaction) will not crash
during a block error like this one, and if block A's container
is reused when writing block B, block A's metadata may
erroneously point at block B.
This patch marks container as read-only if there is error
during syncing data and metadata while Close()/FlushDataAsync()
a block, to avoid further writes. It also adjusts existing fault
injection test to ensure test failure without the fix.
Change-Id: I15062b9d82c9cb563fb6bb2af7ec89da5f71e28f
---
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, 129 insertions(+), 49 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/7374/17
--
To view, visit http://gerrit.cloudera.org:8080/7374
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I15062b9d82c9cb563fb6bb2af7ec89da5f71e28f
Gerrit-PatchSet: 17
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot