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

Re: [PATCH 1/4] http: fix retry count and Retry-After timing

From
RMRavi Mistry <rmistry@google.com>
Date
Nov 3, 2026, 19:05 UTC
Message-ID
<CAF+mdida+tKjE884ZvsgLndzK8AvY0csYLzKPMmXkUpDF0r9ug@mail.gmail.com>
In-Reply-To
<xmqqpkwmenf3.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> > -	/* If retries are disabled and we got a 429, fail immediately */
> > -	if (ret == HTTP_RATE_LIMITED && !http_max_retries)
> > -		return HTTP_ERROR;
> > -
>
> I am not sure I get this removal.  If it is because the change to
> the next hunk (the condition to loop with the while statement)
> already covers it, I guess it makes sense, because we never enter
> the while() loop and we will return HTTP_ERROR more or less the same
> way as the above if http_max_retries is false.

Yes, and moving that check to after the while() loop also handles the case where the initial request returns 401 and the re-authenticated request inside the loop returns 429 when http.maxRetries is 0, without falsely logging "retries-exhausted". I clarified this in the commit message in v2.

Thanks!
Previous: Junio C HamanoNext: Ravi Mistry via GitGitGadget
Message 4 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.