kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject kudu git commit: [rpc] micro clean-up on RpcContext
Date Thu, 28 Dec 2017 00:08:29 GMT
Repository: kudu
Updated Branches:
  refs/heads/master ae62b8697 -> 07e4cbd4d


[rpc] micro clean-up on RpcContext

Reuse the code from RpcContext::RespondRpcFailure() in
RpcContext::RespondFailure() implementation.

This changelist does not contain any functional changes.

Change-Id: I0ef93200a8491e9cdecd5ebf3f146d1f986977ef
Reviewed-on: http://gerrit.cloudera.org:8080/8919
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/07e4cbd4
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/07e4cbd4
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/07e4cbd4

Branch: refs/heads/master
Commit: 07e4cbd4d1edb0d1ce9bd0e9c2dac7b8ce321539
Parents: ae62b86
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Fri Dec 22 17:55:29 2017 -0800
Committer: Alexey Serbin <aserbin@cloudera.com>
Committed: Thu Dec 28 00:03:21 2017 +0000

----------------------------------------------------------------------
 src/kudu/rpc/rpc_context.cc | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/07e4cbd4/src/kudu/rpc/rpc_context.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc_context.cc b/src/kudu/rpc/rpc_context.cc
index 9c3d154..7af981b 100644
--- a/src/kudu/rpc/rpc_context.cc
+++ b/src/kudu/rpc/rpc_context.cc
@@ -96,18 +96,7 @@ void RpcContext::RespondNoCache() {
 }
 
 void RpcContext::RespondFailure(const Status &status) {
-  if (AreResultsTracked()) {
-    result_tracker_->FailAndRespond(call_->header().request_id(),
-                                    ErrorStatusPB::ERROR_APPLICATION, status);
-  } else {
-    VLOG(4) << call_->remote_method().service_name() << ": Sending RPC failure
response for "
-        << call_->ToString() << ": " << status.ToString();
-    TRACE_EVENT_ASYNC_END2("rpc_call", "RPC", this,
-                           "status", status.ToString(),
-                           "trace", trace()->DumpToString());
-    call_->RespondFailure(ErrorStatusPB::ERROR_APPLICATION, status);
-    delete this;
-  }
+  return RespondRpcFailure(ErrorStatusPB::ERROR_APPLICATION, status);
 }
 
 void RpcContext::RespondRpcFailure(ErrorStatusPB_RpcErrorCodePB err, const Status& status)
{


Mime
View raw message