Adar Dembo has submitted this change and it was merged.

Change subject: KUDU-1769: fs check action with rudimentary data block GC
......................................................................


KUDU-1769: fs check action with rudimentary data block GC

This commit introduces a new "fs check" action to the CLI tool. For the time
being its capabilities are slim:
- Detecting missing blocks.
- Detecting orphaned blocks, optionally "repairing" (i.e. deleting) them.

I'm sure it'll be augmented to perform more consistency checks and repairs
in the future.

Why build this in the CLI tool and not in the block manager? A few reasons:
1. This "poor man" approach to GCing orphaned data blocks is extremely
   heavy-weight. Doing it at server startup is probably a bad idea.
2. Performance aside, finding a good time at server startup to compare the
   block lists will require additional refactoring and reordering.
3. If we change our minds, we can always move it later.

I do expect that the block manager will take on some check or repair duties,
but they'll be relegated to startup time, and will be much smaller in scope
(e.g. the LBM could repunch holes that previously failed to punch).

Change-Id: I82da8e234c338cd5a7540a22cebfa0a4958388ec
Reviewed-on: http://gerrit.cloudera.org:8080/6361
Tested-by: Adar Dembo <[email protected]>
Reviewed-by: Mike Percy <[email protected]>
Reviewed-by: Dinesh Bhat <[email protected]>
---
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_fs.cc
M src/kudu/tserver/tablet_copy_source_session.cc
5 files changed, 233 insertions(+), 14 deletions(-)

Approvals:
  Dinesh Bhat: Looks good to me, but someone else must approve
  Mike Percy: Looks good to me, approved
  Adar Dembo: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/6361
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I82da8e234c338cd5a7540a22cebfa0a4958388ec
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dinesh Bhat <[email protected]>
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to