git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] enable "no-done" extension only when fetching over smart-http
@ 2011-03-29 17:16 Junio C Hamano
  2011-03-29 17:24 ` Shawn Pearce
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Junio C Hamano @ 2011-03-29 17:16 UTC (permalink / raw)
  To: git; +Cc: Shawn O. Pearce

When 'no-done' protocol extension is used, the upload-pack (i.e. the
server side) process stops listening to the fetch-pack after issuing the
final NAK, and starts sending the generated pack data back, but there may
be more "have" send by the latter in flight that the fetch-pack is
expecting to be responded with ACK/NAK.  This will typically result in a
deadlock (both will block on write that the other end never reads) or
SIGPIPE on the fetch-pack end (upload-pack will finish writing a small
pack and goes away).

Disable it unless fetch-pack is running under smart-http, where there is
no such streaming issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/fetch-pack.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 59fbda5..52707a8 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -708,7 +708,8 @@ static struct ref *do_fetch_pack(int fd[2],
 		if (server_supports("no-done")) {
 			if (args.verbose)
 				fprintf(stderr, "Server supports no-done\n");
-			no_done = 1;
+			if (args.stateless_rpc)
+				no_done = 1;
 		}
 	}
 	else if (server_supports("multi_ack")) {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-29 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 17:16 [PATCH] enable "no-done" extension only when fetching over smart-http Junio C Hamano
2011-03-29 17:24 ` Shawn Pearce
2011-03-29 17:24 ` [PATCH] enable "no-done" extension only when serving " Junio C Hamano
2011-03-29 17:31   ` Shawn Pearce
2011-03-29 17:32 ` Junio C Hamano

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