MCPcopy Create free account
hub / github.com/apache/impala / DelayedRetryCb

Method DelayedRetryCb

be/src/kudu/rpc/rpc.cc:64–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void RpcRetrier::DelayedRetryCb(Rpc* rpc, const Status& status) {
65 Status new_status = status;
66 if (new_status.ok()) {
67 // Has this RPC timed out?
68 if (deadline_.Initialized()) {
69 if (MonoTime::Now() > deadline_) {
70 string err_str = Substitute("$0 passed its deadline", rpc->ToString());
71 if (!last_error_.ok()) {
72 SubstituteAndAppend(&err_str, ": $0", last_error_.ToString());
73 }
74 new_status = Status::TimedOut(err_str);
75 }
76 }
77 }
78 if (new_status.ok()) {
79 controller_.Reset();
80 rpc->SendRpc();
81 } else {
82 rpc->SendRpcCb(new_status);
83 }
84}
85
86} // namespace rpc
87} // namespace kudu

Callers 1

DelayedRetryMethod · 0.95

Calls 9

SubstituteFunction · 0.85
SubstituteAndAppendFunction · 0.85
TimedOutFunction · 0.85
SendRpcMethod · 0.80
SendRpcCbMethod · 0.80
okMethod · 0.45
InitializedMethod · 0.45
ToStringMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected