Re: [PATCH 2/4] http: add exponential backoff without Retry-After
- From
- Ravi Mistry <rmistry@google.com>
- Date
- Nov 3, 2026, 19:05 UTC
- Message-ID
- <CAF+mdieDWEaVV3RT1xmxxpB6KPYOfN7mi_20vKnKe76C4vFP7w@mail.gmail.com>
- In-Reply-To
- <xmqqpkwmaw51.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> It somehow feels that the default value of 0 (immediate retry) does > not mesh well with exponential backoff. Will we keep retrying > immediately after failing until we run out of retries?
Right, when http.retryAfter is 0 (and no Retry-After header is sent), every retry happens immediately without waiting. I kept 0 as the default to preserve the existing behavior from 640657ffd0 (and its t5584 tests). I made this explicit in the http.retryAfter and http.maxRetryTime documentation in v2.
> Or would it suffice to pass (http_max_retries - rate_limit_retries) > in place of the 'attempt' parameter? > > Not complaining. Just making an observation.
Passing (http_max_retries - rate_limit_retries) here and only introducing 'attempt' in Patch 4/4 is much cleaner, so I updated v2 to do that.
Thanks!