You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2016/04/19 11:46:25 UTC

[kudu-CR] KUDU-1377 (part 3): Ignore corrupted trailing records on LBM metadata

Hello Adar Dembo, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/2595

to look at the new patch set (#6).

Change subject: KUDU-1377 (part 3): Ignore corrupted trailing records on LBM metadata
......................................................................

KUDU-1377 (part 3): Ignore corrupted trailing records on LBM metadata

This patch causes the LogBlockManager to automatically detect and
tolerate a trailing partial record in a container metadata file. Such an
on-disk state can occur as a result of a crash or a failure to write a
full record because a disk was full.

If a container metadata file is detected to have a partial trailing
record, that record is assumed to have been the result of a
write-in-progress at the time of a fault. In such a case, it is safe to
truncate this partial record because the write was not considered
successful. The file is truncated at the offset where the partial record
begins and a warning message is logged. After truncating the metadata
file, the LogBlockManager continues appending records to that container
metadata file beginning at the point at which the file was truncated.

Adds a test that corrupts a LBC metadata file in various ways.

Change-Id: I0b88ba051b390b6a2587eecdd205c478f1edccb4
---
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, 264 insertions(+), 56 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/95/2595/6
-- 
To view, visit http://gerrit.cloudera.org:8080/2595
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0b88ba051b390b6a2587eecdd205c478f1edccb4
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>