Exponential Backoff ranges are incorrect #11107
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
We have a
scaling
factor, but we multiply the initial range by 2, instead.google-cloud-cpp/google/cloud/internal/backoff_policy.h
Line 131 in 9737c4b
Moreover, we do not check if we have hit the maximum until after generating the first backoff
google-cloud-cpp/google/cloud/internal/backoff_policy.cc
Lines 45 to 55 in 9737c4b
This leads to kooky behavior. Let's say I have an
ExponentialBackoffPolicy(10s, 11s, 1.1)
.The first range will be: [10s, 20s], which does not respect the maximum.
All subsequent ranges will be: [5.5s, 11s], which does not respect the minimum.
Lol.
The text was updated successfully, but these errors were encountered: