Undo change to spec and corresponding code

reviewable/pr13494/r10
David Garcia Quintas 7 years ago
parent b02fde2de3
commit bdea93374d
  1. 5
      doc/connection-backoff.md
  2. 3
      src/core/lib/backoff/backoff.cc

@ -26,8 +26,9 @@ ConnectWithBackoff()
!= SUCCESS)
SleepUntil(current_deadline)
current_backoff = Min(current_backoff * MULTIPLIER, MAX_BACKOFF)
jitter = UniformRandom(-JITTER * current_backoff, JITTER * current_backoff)
current_deadline = now() + Min(current_backoff + jitter, MAX_BACKOFF)
current_deadline = now() + current_backoff +
UniformRandom(-JITTER * current_backoff, JITTER * current_backoff)
```
With specific parameters of

@ -59,8 +59,7 @@ grpc_millis BackOff::Step(grpc_exec_ctx* exec_ctx) {
const double jitter = generate_uniform_random_number_between(
&rng_state_, -options_.jitter() * current_backoff_,
options_.jitter() * current_backoff_);
const grpc_millis next_timeout = std::min(
(grpc_millis)(current_backoff_ + jitter), options_.max_backoff());
const grpc_millis next_timeout = (grpc_millis)(current_backoff_ + jitter);
return next_timeout + grpc_exec_ctx_now(exec_ctx);
}

Loading…
Cancel
Save