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

Re: [PATCH 3/5] git push: verify refs early

From
Clemens Buchacher <drizzd@aon.at>
Date
Feb 14, 2012, 08:59 UTC
Message-ID
<20120214085919.GB1762@ecki>
In-Reply-To
<7v4nuucrbm.fsf@alter.siamese.dyndns.org>
On Mon, Feb 13, 2012 at 02:16:13PM -0800, Junio C Hamano wrote:
Show 26 quoted lines
> Clemens Buchacher <drizzd@aon.at> writes:
> 
> > I suppose with some effort, this could be done for smart HTTP as well.
> > But I am not sure if we actually want the overhead of the additional
> > ping-pong for HTTP.
> 
> Hrm, I am confused.
> 
> The updated protocol exchange, if I am reading your patch correctly, would
> go like this (S stands for the sender, R for the receiver):
> 
>         R: Here are the tips of my refs
>         ----
>         S: I'd like to update your refs this way
>         ----
>       + R: No you cannot because all updates will fail, go away
>         or
>       + R: You may proceed, as some updates may succeed
>         ----
>         S: Here is the packfile
>         ----
>         R: Here is how I processed your request
> 
> Given that this makes the sender stall for both smart HTTP and native
> protocol, don't your worries about the additional ping-pong apply equally
> to both transports?

That is true. However, my assumption was that the overhead is greater for HTTP, because the native protocol is full-duplex, while HTTP tears down the connection and starts from scratch with each request. But to be honest, I am not confident that this assumption is correct.

So, the stall might be an issue for both the native and the HTTP protocol, or for neither. We should probably find out and then decide whether to make this change for both protocols or not at all.

Show 5 quoted lines
> If it is not worth doing for smart HTTP, I wonder if it is worth doing for
> native transport.  After all, "all updates will fail" is hopefully the
> less likely case, and with this protocol extension, we end up penalizing
> the common case with an extra stall for everybody, regardless of the
> transport.

Indeed. I wish we could make the ref validation asynchronous. The client would start sending object data right away, while listening for an "abort" command on the side-band. But if I understand correctly, that is not possible for HTTP.

Previous: Junio C HamanoNext: Clemens Buchacher
Message 12 of 16 in “optionally deny all pushes”
  1. optionally deny all pushesClemens Buchacher, Jan 21, 2012
  2. Junio C HamanoJan 21, 2012
  3. 0/5 verify refs earlyClemens Buchacher, Feb 13, 2012
  4. 1/5 git rev-list: fix invalid typecastClemens Buchacher, Feb 13, 2012
  5. Junio C HamanoFeb 13, 2012
  6. 2/5 do not override receive-pack errorsClemens Buchacher, Feb 13, 2012
  7. Junio C HamanoFeb 13, 2012
  8. Clemens BuchacherFeb 14, 2012
  9. Junio C HamanoFeb 14, 2012
  10. 3/5 git push: verify refs earlyClemens Buchacher, Feb 13, 2012
  11. Junio C HamanoFeb 13, 2012
  12. Clemens BuchacherFeb 14, 2012
  13. 4/5 t5541: use configured port numberClemens Buchacher, Feb 13, 2012
  14. Junio C HamanoFeb 13, 2012
  15. 5/5 push/fetch/clone --no-progress suppresses progress outputClemens Buchacher, Feb 13, 2012
  16. Junio C HamanoFeb 13, 2012

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.