Todd Lipcon has submitted this change and it was merged. Change subject: tool: add a 'local-replica cmeta set-term' tool ......................................................................
tool: add a 'local-replica cmeta set-term' tool Through abuse of some other tools (and restoring from a backup of a cmeta file) I ended up with a situation where a tablet's WAL contained operations from a term higher than the term listed in its cmeta file. This caused the tablet to fail to start due to seeing this inconsistency (the highest term in the WAL should always be <= the term in the cmeta). This patch adds a tool that I wrote in order to recover from the situation. The tool allows the operator to override the term stored in the cmeta file. It's restricted to only bumping the term upwards, since doing so is always "safe" whereas reducing it backwards could have really bad consequences. I also took the opportunity to add some new tests for the 'cmeta' tool functionality. Change-Id: I7525ffbe772f214e0972a6b450f3f1609109ca05 Reviewed-on: http://gerrit.cloudera.org:8080/7049 Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Mike Percy <[email protected]> Tested-by: Kudu Jenkins Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_local_replica.cc 2 files changed, 122 insertions(+), 11 deletions(-) Approvals: Mike Percy: Looks good to me, but someone else must approve Adar Dembo: Looks good to me, but someone else must approve Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/7049 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7525ffbe772f214e0972a6b450f3f1609109ca05 Gerrit-PatchSet: 3 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]>
