Attila Bukor has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/18029 )

Change subject: [tools] KUDU-3337 Add unsafe_create_cmeta tool
......................................................................

[tools] KUDU-3337 Add unsafe_create_cmeta tool

We've seen some cases when a power outage on XFS lead to empty cmeta
files, causing some tablets to fail to start (KUDU-2195). There is a
flag to force fsync, but it's disabled by default except for XFS.

Fortunately, it's possible to reconstruct how a cmeta should look like
based on the information found in ksck (peers) and WAL dumps (term and
config index). Still, the only way to actually create a cmeta file even
if this information is available, was to copy an existing cmeta file and
run "kudu pbc edit" on it, which is very error-prone and hard to
automate.

This commit introduces a new unsafe_create_cmeta tool under
local_replica, which creates a new cmeta file based on the term, config
index and peers as provided in CLI arguments.

I manually tested this tool by using it to recover a tablet with three
empty cmeta files.

Change-Id: I136cc5b5797420a9ca9156f37c3e281da0c265d7
Reviewed-on: http://gerrit.cloudera.org:8080/18029
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <ale...@apache.org>
---
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action_local_replica.cc
2 files changed, 171 insertions(+), 1 deletion(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I136cc5b5797420a9ca9156f37c3e281da0c265d7
Gerrit-Change-Number: 18029
Gerrit-PatchSet: 9
Gerrit-Owner: Attila Bukor <abu...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <achenn...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <ale...@apache.org>
Gerrit-Reviewer: Andrew Wong <anj...@gmail.com>
Gerrit-Reviewer: Attila Bukor <abu...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Chovan <zcho...@cloudera.com>

Reply via email to