From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
git@vger.kernel.org,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: do people find t5504.8 flaky?
Date: Wed, 13 Nov 2019 12:47:56 +0900 [thread overview]
Message-ID: <xmqqh838bfo3.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20191113010337.GA20023@sigill.intra.peff.net> (Jeff King's message of "Tue, 12 Nov 2019 20:03:37 -0500")
Jeff King <peff@peff.net> writes:
> So really, what we want for this case is to just get the remote status,
> like so:
>
> diff --git a/send-pack.c b/send-pack.c
> index 34c77cbb1a..d4db965b96 100644
> --- a/send-pack.c
> +++ b/send-pack.c
> @@ -565,19 +565,19 @@ int send_pack(struct send_pack_args *args,
>
> if (need_pack_data && cmds_sent) {
> if (pack_objects(out, remote_refs, extra_have, args) < 0) {
> - for (ref = remote_refs; ref; ref = ref->next)
> - ref->status = REF_STATUS_NONE;
> if (args->stateless_rpc)
> close(out);
> if (git_connection_is_socket(conn))
> shutdown(fd[0], SHUT_WR);
>
> /*
> * Do not even bother with the return value; we know we
> - * are failing, and just want the error() side effects.
> + * are failing, and just want the error() side effects,
> + * as well as marking refs with the remote status (if
> + * we get one).
> */
> if (status_report)
> - receive_unpack_status(&reader);
> + receive_status(&reader, remote_refs);
>
> if (use_sideband) {
> close(demux.out);
>
> I was worried at first that we might make things worse for the case that
> the network has hung up completely (which would cause pack-objects to
> fail, but also cause us to not get anything from the remote). But this
> is really no worse. Even in the existing code, we'd complain to stderr
> about trying to read the unpack status. And then when we read the remote
> ref status, as soon as we see a bad packet we just quietly stop reading
> (thus leaving any unmentioned refs as EXPECTING_REPORT).
>
> So with that second patch above, the test failure goes away for me.
Nicely analyzed and patched.
next prev parent reply other threads:[~2019-11-13 3:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 2:45 do people find t5504.8 flaky? Junio C Hamano
2019-04-23 3:02 ` Jeff King
2019-11-13 0:07 ` SZEDER Gábor
2019-11-13 1:03 ` Jeff King
2019-11-13 2:07 ` Jeff King
2019-11-18 22:30 ` SZEDER Gábor
2019-11-18 23:25 ` Randall S. Becker
2019-11-13 3:47 ` Junio C Hamano [this message]
2019-04-29 13:36 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh838bfo3.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=szeder.dev@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).