Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/10340


Change subject: WIP KUDU-2359: allow startup with missing data dirs
......................................................................

WIP KUDU-2359: allow startup with missing data dirs

This patch allows Kudu to start up with some of the expected data
directories missing. Note that this behavior is different than starting
up Kudu with extra data directories in `fs_data_dirs`, which is still
not supported unless running the update tool.

Some notes and changes in this patch include:
- methods involved in loading PathInstanceMetadataFiles will now treat
  missing instance files as "unhealthy", the same way they treat
  instance files that fail due disk errors
- DataDirManager::LoadInstances() has been updated to handle the above
  change, optionally returning the missing instances as unhealthy
  instances
- various codepaths that previously ended FsManager::Open() with an
  IOError/Corruption because all drives were failed will now return
  NotFound, indicating Kudu should attempt to create a new FS layout
- as a byproduct of the above changes, when opening the FS layout in
  ENFORCE_CONSISTENCY mode with an extra data dir included in
  `fs_data_dirs`, Kudu will fail later than before, at the integrity
  check, and yield an IOError instead of a NotFound error
- the UUID and UUID index assignment for missing/failed directories has
  been updated when opening the speculative directory manager; see
  DataDirManager::Open() for more details.

WIP this change touches codepaths with a fair number of edge cases, and
as such, I haven't fully convinced myself this is the best approach.
That said, it is reviewable and has tests passing. Open to feedback.

Change-Id: I61a71265c3cc34a7b72320149770a814ec7f8351
---
M src/kudu/fs/block_manager_util.cc
M src/kudu/fs/data_dirs-test.cc
M src/kudu/fs/data_dirs.cc
M src/kudu/fs/data_dirs.h
M src/kudu/fs/fs_manager-test.cc
M src/kudu/fs/fs_manager.cc
M src/kudu/tools/kudu-tool-test.cc
7 files changed, 259 insertions(+), 126 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/40/10340/1
--
To view, visit http://gerrit.cloudera.org:8080/10340
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I61a71265c3cc34a7b72320149770a814ec7f8351
Gerrit-Change-Number: 10340
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <[email protected]>

Reply via email to