git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/4] http: add exponential backoff without Retry-After

From
RMRavi 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!
Previous: Junio C HamanoNext: Ravi Mistry via GitGitGadget
Message 7 of 20 in “http: exponential backoff, configurable status codes, and post_rpc() retries”
  1. 0/4 http: exponential backoff, configurable status codes, and post_rpc() retriesRavi Mistry via GitGitGadget, Oct 31, 2026
  2. 1/4 http: fix retry count and Retry-After timingRavi Mistry via GitGitGadget, Oct 31, 2026
  3. Junio C HamanoNov 3, 2026
  4. Ravi MistryNov 3, 2026
  5. 2/4 http: add exponential backoff without Retry-AfterRavi Mistry via GitGitGadget, Oct 31, 2026
  6. Junio C HamanoNov 3, 2026
  7. Ravi MistryNov 3, 2026
  8. 3/4 http: add http.retryStatusCodes config optionRavi Mistry via GitGitGadget, Oct 31, 2026
  9. Junio C HamanoNov 3, 2026
  10. Ravi MistryNov 3, 2026
  11. 4/4 remote-curl: retry transient HTTP errors in post_rpc()Ravi Mistry via GitGitGadget, Oct 31, 2026
  12. Junio C HamanoNov 3, 2026
  13. 0/4 http: exponential backoff, configurable status codes, and post_rpc() retriesRavi Mistry via GitGitGadget, Nov 3, 2026
  14. 1/4 http: fix retry count and Retry-After timingRavi Mistry via GitGitGadget, Nov 3, 2026
  15. 2/4 http: add exponential backoff without Retry-AfterRavi Mistry via GitGitGadget, Nov 3, 2026
  16. brian m. carlsonNov 4, 2026
  17. Ravi MistryNov 5, 2026
  18. 3/4 http: add http.retryStatusCodes config optionRavi Mistry via GitGitGadget, Nov 3, 2026
  19. Junio C HamanoNov 3, 2026
  20. 4/4 remote-curl: retry transient HTTP errors in post_rpc()Ravi Mistry via GitGitGadget, Nov 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.