Make folly::retrying exponential backoff time behavior more consistent
Summary: If the value for backoff_max is less than backoff_min, we will see inconsistent behavior where the backoff_min sleep duration is used for the first 57 attempts, then backoff_max will be used. In our case, we hit an issue where 0 was passed for backoff_max. We would see backoff_min sleep times for the first 57 attempts, then immediately drop to 0 sleep time which led to no retry wait at all. If backoff_max < backoff_min, there's no way to respect both, but this makes the behavior consistent across all tries. Reviewed By: yfeldblum Differential Revision: D15282681 fbshipit-source-id: d9dd7b2498d77e4a01c9454a639b612ed9e26519
Showing
Please register or sign in to comment