git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sean McAllister <smcallis@google.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org, peff@peff.net,
	Masaya Suzuki <masayasuzuki@google.com>
Subject: Re: [PATCH 3/3] http: automatically retry some requests
Date: Tue, 13 Oct 2020 10:45:01 -0700	[thread overview]
Message-ID: <xmqq362ikoki.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAM4o00fL4oGNG_Z7tF5bL=Kp===683LBo1RhmZ=vZ6Kie=-jzA@mail.gmail.com> (Sean McAllister's message of "Tue, 13 Oct 2020 09:03:15 -0600")

Sean McAllister <smcallis@google.com> writes:

>> > +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.

  reply	other threads:[~2020-10-13 17:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201012184806.166251-1-smcallis@google.com>
2020-10-12 18:48 ` [PATCH 2/3] replace CURLOPT_FILE With CURLOPT_WRITEDATA Sean McAllister
2020-10-12 19:26   ` Johannes Schindelin
2020-10-12 18:48 ` [PATCH 3/3] http: automatically retry some requests Sean McAllister
2020-10-12 20:15   ` Johannes Schindelin
2020-10-12 21:00     ` Junio C Hamano
2020-10-13 15:03     ` Sean McAllister
2020-10-13 17:45       ` Junio C Hamano [this message]
2020-10-12 20:19 ` [PATCH] remote-curl: add testing for intelligent retry for HTTP Sean McAllister
2020-10-12 20:51   ` Junio C Hamano
2020-10-12 22:20     ` Sean McAllister
2020-10-12 22:30       ` Junio C Hamano
2020-10-13 14:25         ` Johannes Schindelin
2020-10-13 17:29           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq362ikoki.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=masayasuzuki@google.com \
    --cc=peff@peff.net \
    --cc=smcallis@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).