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

Re: [PATCH 3/3] http: automatically retry some requests

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2020, 17:45 UTC
Message-ID
<xmqq362ikoki.fsf@gitster.c.googlers.com>
In-Reply-To
<CAM4o00fL4oGNG_Z7tF5bL=Kp===683LBo1RhmZ=vZ6Kie=-jzA@mail.gmail.com>
Sean McAllister <smcallis@google.com> writes:
Show 9 quoted lines
>> > +static int http_retry_limit = 3;
>> > +static int http_default_delay = 2;
>>
>> Should there be a config option for that? Also, it took me some time to
>> find the code using this variable in order to find out what unit to use:
>> it is seconds (not microseconds, as I had expected). Maybe this can be
>> documented in the variable name, or at least in a comment?
>
> Junio tossed that out during our private review and I think we decided to just

Needs clarification. Here "that" in "tossed that out" only refers to "static int const http_retry_limit = 3" and friends and nothing else. There weren't any discussion on units or comments. I did mention that it is an obvious future possibility to make these configurable and that was why I suggested to "toss out" the const.

It seems we'll see names with "seconds" in them somewhere, which is good.

> I've been writing a lot of python code lately =D  So splitting into
> lines was a natural paradigm for me.  You're right, I like yours more.  I've
> refactored it to be closer to that.  Little bit of fiddling to deal with header
> whitespace properly, but it's pretty close.

Good. I personally think strbuf_split() is a mistaken API whose use needs to be killed, so it makes me happy to see one new callsite we didn't have to add ;-)

Thanks.
Previous: Sean McAllisterNext: Sean McAllister
Message 7 of 13 in “replace CURLOPT_FILE With CURLOPT_WRITEDATA”
  1. 2/3 replace CURLOPT_FILE With CURLOPT_WRITEDATASean McAllister, Oct 12, 2020
  2. Johannes SchindelinOct 12, 2020
  3. 3/3 http: automatically retry some requestsSean McAllister, Oct 12, 2020
  4. Johannes SchindelinOct 12, 2020
  5. Junio C HamanoOct 12, 2020
  6. Sean McAllisterOct 13, 2020
  7. Junio C HamanoOct 13, 2020
  8. remote-curl: add testing for intelligent retry for HTTPSean McAllister, Oct 12, 2020
  9. Junio C HamanoOct 12, 2020
  10. Sean McAllisterOct 12, 2020
  11. Junio C HamanoOct 12, 2020
  12. Johannes SchindelinOct 13, 2020
  13. Junio C HamanoOct 13, 2020

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.