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

Re: [PATCH 3/7] pack-protocol.txt: Mark all LFs in push-cert as required

From
Shawn Pearce <spearce@spearce.org>
Date
Jul 3, 2015, 18:43 UTC
Message-ID
<CAJo=hJsoKSB23KNNF9Xr-NUAqUXvq+O-ZYOSyb4wAC1TZKZ2-g@mail.gmail.com>
In-Reply-To
<20150703180718.GB9223@peff.net>
On Fri, Jul 3, 2015 at 11:07 AM, Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
> I wondered briefly whether this impacted the keepalives we added to
> `upload-pack` in 05e9515; those are implemented as 0-byte data packets,
> which we send during the potentially long counting/delta-compression
> phase before we send out pack data. It works there because the packets
> actually contain a single sideband byte, so they are never mistaken for
> a flush packet.

Interesting. I didn't know about 05e9515. This is a great hack. We have similar issues in our server-server system at $DAY_JOB, they use --quiet as no human is watching. So we did a different hack for the same reason.

Show 13 quoted lines
> Related, I recently ran into a case where I think we should do the same
> for pushes. After receiving the pack, `index-pack` may chew on the
> result for literally minutes (try pushing up the entire linux.git
> history sometime). We say nothing at all on the wire until we've
> finished that, run check_everything_connected, and run all hooks.  Some
> clients (or intermediates on the connection) may give up after a few
> minutes of silence.
>
> I think we should have:
>
>   1. Some progress eye-candy from the server to tell us that something
>      is happening, and how close we are to finishing (basically
>      "index-pack -v").

JGit receive-pack has done this for years. We output a progress monitor for the resolving delta phase, and the counting during the graph connectivity check, as JGit being in Java is slow as snot and cannot digest the linux kernel instantly.

>   2. When progress is disabled, similar keepalive packets saying "nope,
>      no output yet".

Yea this is a problem so I think JGit ignores the client's request for "quiet" here and shovels progress messages anyway as a hack to force keep-alive. Never considered the empty side-band message that 05e9515 introduces.

> For (2), hopefully we can implement it in the same way, and rely on
> empty sideband-0 packets. I haven't tested it in practice, though (I
> have some very rough patches for (1) already).
sideband-0 is not going to work for JGit clients.

JGit clients are strict about the sideband stream being 1,2,3 and fail hard if they get any other stream from the server[1].

[1] https://eclipse.googlesource.com/jgit/jgit/+/master/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java#169
Previous: Jeff KingNext: Jeff King
Message 39 of 50 in “Clarify signed push protocol documentation”
  1. 0/7 Clarify signed push protocol documentationDave Borowitz, Jul 1, 2015
  2. 1/7 pack-protocol.txt: Add warning about protocol inaccuraciesDave Borowitz, Jul 1, 2015
  3. Jonathan NiederJul 1, 2015
  4. Junio C HamanoJul 1, 2015
  5. Dave BorowitzJul 1, 2015
  6. 2/7 pack-protocol.txt: Mark LF in command-list as optionalDave Borowitz, Jul 1, 2015
  7. Stefan BellerJul 1, 2015
  8. Dave BorowitzJul 1, 2015
  9. 3/7 pack-protocol.txt: Mark all LFs in push-cert as requiredDave Borowitz, Jul 1, 2015
  10. Junio C HamanoJul 1, 2015
  11. Dave BorowitzJul 1, 2015
  12. Junio C HamanoJul 1, 2015
  13. Dave BorowitzJul 6, 2015
  14. Dave BorowitzJul 6, 2015
  15. Dave BorowitzJul 6, 2015
  16. Dave BorowitzJul 6, 2015
  17. Dave BorowitzJul 6, 2015
  18. Junio C HamanoJul 6, 2015
  19. Shawn PearceJul 6, 2015
  20. Junio C HamanoJul 6, 2015
  21. Junio C HamanoJul 6, 2015
  22. Dave BorowitzJul 6, 2015
  23. Junio C HamanoJul 6, 2015
  24. Dave BorowitzJul 6, 2015
  25. Dave BorowitzJul 6, 2015
  26. Junio C HamanoJul 6, 2015
  27. Dave BorowitzJul 6, 2015
  28. Junio C HamanoJul 6, 2015
  29. Dave BorowitzJul 6, 2015
  30. Junio C HamanoJul 6, 2015
  31. Junio C HamanoJul 6, 2015
  32. Dave BorowitzJul 6, 2015
  33. Junio C HamanoJul 6, 2015
  34. Junio C HamanoJul 1, 2015
  35. Junio C HamanoJul 1, 2015
  36. Jeff KingJul 2, 2015
  37. Junio C HamanoJul 3, 2015
  38. Jeff KingJul 3, 2015
  39. Shawn PearceJul 3, 2015
  40. Jeff KingJul 3, 2015
  41. 4/7 pack-protocol.txt: Elaborate on pusher identityDave Borowitz, Jul 1, 2015
  42. Junio C HamanoJul 1, 2015
  43. 5/7 pack-protocol.txt: Be more precise about pusher-key relationshipDave Borowitz, Jul 1, 2015
  44. 6/7 pack-protocol.txt: Mark pushee field as optionalDave Borowitz, Jul 1, 2015
  45. Junio C HamanoJul 1, 2015
  46. Dave BorowitzJul 1, 2015
  47. Junio C HamanoJul 1, 2015
  48. Junio C HamanoJul 1, 2015
  49. Dave BorowitzJul 1, 2015
  50. 7/7 send-pack.c: Die if the nonce is emptyDave Borowitz, Jul 1, 2015

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.