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

Method SetTimedOut

be/src/kudu/rpc/outbound_call.cc:403–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403void OutboundCall::SetTimedOut(Phase phase) {
404 static const char* kErrMsgNegotiation =
405 "connection negotiation to $1 for RPC $0 timed out after $2 ($3)";
406 static const char* kErrMsgCall = "$0 RPC to $1 timed out after $2 ($3)";
407 DCHECK(phase == Phase::CONNECTION_NEGOTIATION || phase == Phase::REMOTE_CALL);
408
409 // We have to fetch timeout outside the lock to avoid a lock
410 // order inversion between this class and RpcController.
411 const MonoDelta timeout = controller_->timeout();
412 {
413 std::lock_guard<simple_spinlock> l(lock_);
414 status_ = Status::TimedOut(
415 Substitute((phase == Phase::REMOTE_CALL) ? kErrMsgCall : kErrMsgNegotiation,
416 remote_method_.method_name(),
417 conn_id_.remote().ToString(),
418 timeout.ToString(),
419 StateName(state_)));
420 set_state_unlocked((phase == Phase::REMOTE_CALL) ? TIMED_OUT : NEGOTIATION_TIMED_OUT);
421 }
422 CallCallback();
423}
424
425void OutboundCall::SetCancelled() {
426 DCHECK(!IsFinished());

Callers 1

Calls 4

TimedOutFunction · 0.85
SubstituteFunction · 0.85
timeoutMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected