You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Andrew Wong (Code Review)" <ge...@cloudera.org> on 2017/11/06 19:42:08 UTC

[kudu-CR] disk failure: make various delta paths more robust to errors

Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Adar Dembo, Todd Lipcon, 

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

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

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

Change subject: disk failure: make various delta paths more robust to errors
......................................................................

disk failure: make various delta paths more robust to errors

There are various fatal safety checks along paths surrounding deltas.
Some of these CHECKs were in place to enforce in-memory consistency;
these have been made safe by making such wrapped calls handle failure
gracefully (i.e. without leaving some half-updated state), and by
returning errors instead of crashing.

This patch makes the API/behavioral updates:
- DeltaTracker::AtomicUpdateStores is made atomic by pulling out some
  access to disk and by making delta-order validation fatal only in case
  of logical errors rather than physical ones (e.g. disk failures)
- RowSetMetadata::CommitUpdate() now returns a list of blocks to orphan
  and relies on caller to orphan them via the new
  RowSetMetadata::AddOrphanedBlocks().
- It is now possible to reload the in-memory state of a RowSetMetadata
  instance (e.g. in the event of a failure and rollback is necessary).

The following are now atomic with the above changes and some reordering.
- DiskRowSet::MajorCompactDeltaStoresWithColumnIds()
- DeltaTracker::CommitDeltaStoreMetadataUpdate()
- MajorDeltaCompaction::UpdateDeltaTracker()

Change-Id: I0241cd4206ce77ef1fb334458b091bc2092f4141
---
M src/kudu/tablet/delta_compaction.cc
M src/kudu/tablet/delta_compaction.h
M src/kudu/tablet/delta_tracker.cc
M src/kudu/tablet/delta_tracker.h
M src/kudu/tablet/diskrowset.cc
M src/kudu/tablet/metadata-test.cc
M src/kudu/tablet/rowset_metadata.cc
M src/kudu/tablet/rowset_metadata.h
8 files changed, 227 insertions(+), 162 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/8441/2
-- 
To view, visit http://gerrit.cloudera.org:8080/8441
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0241cd4206ce77ef1fb334458b091bc2092f4141
Gerrit-Change-Number: 8441
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>