You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Hao Hao (Code Review)" <ge...@cloudera.org> on 2017/07/24 23:23:41 UTC

[kudu-CR] [WIP]log block manager: mark container as 'read only' after syncing error

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 (#9).

Change subject: [WIP]log block manager: mark container as 'read_only' after syncing error
......................................................................

[WIP]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, when Close() block A in container a, SyncData()
is not successful, but metadata of block A is already on
disk. For merge compaction, the server does not crash for non-eio
error. Based on the existing behavior, the container will be
continued used, result in block A point to others' block data.

This patch marks container as 'read_only' if there is error
during syncing data and metdata 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
2 files changed, 121 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/7374/9
-- 
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: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot