You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/10/09 05:03:42 UTC
[kudu] 01/02: tools: return errors when making calls to the master
This is an automated email from the ASF dual-hosted git repository.
adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 32ab113869aad8dd7b158836658669ab15d217b4
Author: Andrew Wong <aw...@apache.org>
AuthorDate: Tue Oct 8 14:13:50 2019 -0700
tools: return errors when making calls to the master
Change-Id: Ia49eb7d020dcd0cab4dbe8c79c3d32613ac8432f
Reviewed-on: http://gerrit.cloudera.org:8080/14390
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
---
src/kudu/tools/tool_action_common.h | 3 ++-
src/kudu/tools/tool_action_master.cc | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/kudu/tools/tool_action_common.h b/src/kudu/tools/tool_action_common.h
index cf65a73..8c5ba9a 100644
--- a/src/kudu/tools/tool_action_common.h
+++ b/src/kudu/tools/tool_action_common.h
@@ -252,7 +252,8 @@ class LeaderMasterProxy {
const boost::function<void(master::MasterServiceProxy*,
const Req&, Resp*,
rpc::RpcController*,
- const rpc::ResponseCallback&)>& func);
+ const rpc::ResponseCallback&)>& func)
+ WARN_UNUSED_RESULT;
private:
client::sp::shared_ptr<client::KuduClient> client_;
diff --git a/src/kudu/tools/tool_action_master.cc b/src/kudu/tools/tool_action_master.cc
index b4ec058..b83647c 100644
--- a/src/kudu/tools/tool_action_master.cc
+++ b/src/kudu/tools/tool_action_master.cc
@@ -111,8 +111,8 @@ Status ListMasters(const RunnerContext& context) {
ListMastersRequestPB req;
ListMastersResponsePB resp;
- proxy.SyncRpc<ListMastersRequestPB, ListMastersResponsePB>(
- req, &resp, "ListMasters", &MasterServiceProxy::ListMastersAsync);
+ RETURN_NOT_OK((proxy.SyncRpc<ListMastersRequestPB, ListMastersResponsePB>(
+ req, &resp, "ListMasters", &MasterServiceProxy::ListMastersAsync)));
if (resp.has_error()) {
return StatusFromPB(resp.error().status());