Repository: kudu Updated Branches: refs/heads/branch-1.5.x 011a70b91 -> 82bcc8c96
[tools] KUDU-2331: Allow move tool to work when uninvolved tserver is down The move tool requires a clean ksck for the tablet it's acting on for safety reasons, but the check for this failed if a tablet server was down, even if the tablet server didn't host a replica for the tablet and wasn't the destination server. This fixes the move command so a down tserver uninvolved in the move won't prevent the move. Change-Id: Id1fc60233f4f50f478da7ccb104e37df3067400c Reviewed-on: http://gerrit.cloudera.org:8080/9510 Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Kudu Jenkins Reviewed-on: http://gerrit.cloudera.org:8080/9820 Reviewed-by: Will Berkeley <wdberke...@gmail.com> Tested-by: Will Berkeley <wdberke...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/82bcc8c9 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/82bcc8c9 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/82bcc8c9 Branch: refs/heads/branch-1.5.x Commit: 82bcc8c968c97b6820590a8f79a7c5ca9c200560 Parents: 011a70b Author: Will Berkeley <wdberke...@apache.org> Authored: Tue Mar 6 11:37:05 2018 -0800 Committer: Will Berkeley <wdberke...@gmail.com> Committed: Tue Mar 27 20:09:57 2018 +0000 ---------------------------------------------------------------------- src/kudu/tools/tool_action_tablet.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/82bcc8c9/src/kudu/tools/tool_action_tablet.cc ---------------------------------------------------------------------- diff --git a/src/kudu/tools/tool_action_tablet.cc b/src/kudu/tools/tool_action_tablet.cc index db6c4b7..9d43d0b 100644 --- a/src/kudu/tools/tool_action_tablet.cc +++ b/src/kudu/tools/tool_action_tablet.cc @@ -141,7 +141,11 @@ Status DoKsckForTablet(const vector<string>& master_addresses, const string& tab ksck.set_tablet_id_filters({ tablet_id }); RETURN_NOT_OK(ksck.CheckMasterRunning()); RETURN_NOT_OK(ksck.FetchTableAndTabletInfo()); - RETURN_NOT_OK(ksck.FetchInfoFromTabletServers()); + // The return Status is ignored since a tserver that is not the destination + // nor a host of a replica might be down, and in that case the move should + // succeed. Problems with the destination tserver or the tablet will still + // be detected by ksck or other commands. + ignore_result(ksck.FetchInfoFromTabletServers()); return ksck.CheckTablesConsistency(); }