From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id ACC681F55B for ; Mon, 18 May 2020 16:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728416AbgERQwJ (ORCPT ); Mon, 18 May 2020 12:52:09 -0400 Received: from cloud.peff.net ([104.130.231.41]:49792 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726958AbgERQwI (ORCPT ); Mon, 18 May 2020 12:52:08 -0400 Received: (qmail 20507 invoked by uid 109); 18 May 2020 16:52:07 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Mon, 18 May 2020 16:52:07 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 3859 invoked by uid 111); 18 May 2020 16:52:07 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 18 May 2020 12:52:07 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 18 May 2020 12:52:06 -0400 From: Jeff King To: Junio C Hamano Cc: Denton Liu , Git Mailing List , Force Charlie , Jonathan Tan , Jonathan Nieder Subject: Re: [PATCH 6/6] remote-curl: ensure last packet is a flush Message-ID: <20200518165206.GE42240@coredump.intra.peff.net> References: <7a689da2bb820f70d9e668d656b088af2297d456.1589393036.git.liu.denton@gmail.com> <20200515210245.GA3278654@generichostname> <20200515214102.GE115445@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, May 18, 2020 at 09:34:42AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, May 15, 2020 at 05:02:45PM -0400, Denton Liu wrote: > > > >> On Wed, May 13, 2020 at 02:04:58PM -0400, Denton Liu wrote: > >> > This is not a complete solution to the problem, however. It is possible > >> > that a flush packet could be sent in the middle of a message and the > >> > connection could die immediately after. Then, remote-curl would not > >> > error out and fetch-pack would still be in the middle of a transaction > >> > and they would enter deadlock. A complete solution would involve > >> > reframing the stateless-connect protocol, possibly by introducing > >> > another control packet ("0002"?) as a stateless request separator > >> > packet which is always sent at the end of post_rpc(). > >> > ... > > I do kind of like the idea of a stateless separator packet, if I > > understand your meaning correctly. I'll wait to see what the patches > > look like. :) > > I vaguely recall talking with somebody (perhaps it was Shawn Pearce) > about my long-time complaint on the on-the-wire protocol, in that > the protocol sometimes uses flush to merely mean "I've finished > speaking one section of my speech" and sometimes "I've done talking > for now and it's your turn to speak to me" (the receiving end needs > to know which one a particular flush means without knowing the > context in which it is issued---which makes it impossible to write a > protocol agnostic proxy. > > If the above proposal means that we'll have an explicit way to say > "Not just I am done with one section of my speech, but it is your > turn to speak and I am going to listen", that would be wonderful. I think we already have that now in v2 because of the "0001" delim packet. All of the flushes are (I think) really "this is the end of my speech", and any inner "my list is ending, but I have more to say" delimiters are "0001". -Peff