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

Method DelayedRetry

be/src/kudu/rpc/rpc.cc:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void RpcRetrier::DelayedRetry(Rpc* rpc, const Status& why_status) {
46 if (!why_status.ok() && (last_error_.ok() || last_error_.IsTimedOut())) {
47 last_error_ = why_status;
48 }
49 // If the delay causes us to miss our deadline, RetryCb will fail the
50 // RPC on our behalf.
51 MonoDelta backoff = ComputeBackoff(attempt_num_++);
52 messenger_->ScheduleOnReactor(
53 [this, rpc](const Status& s) { this->DelayedRetryCb(rpc, s); }, backoff);
54}
55
56MonoDelta RpcRetrier::ComputeBackoff(int num_attempts) const {
57 if (backoff_ == BackoffType::LINEAR) {

Callers 2

GotNewTokenRetryCbMethod · 0.80
RetryIfNeededMethod · 0.80

Calls 4

DelayedRetryCbMethod · 0.95
IsTimedOutMethod · 0.80
ScheduleOnReactorMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected