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

Re: Synchronous replication on push

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 4, 2024, 22:36 UTC
Message-ID
<ZylMZGLdwVDFcAwF@tapette.crustytoothpaste.net>
In-Reply-To
<20241104133544.A04D760A95@jupiter.mumble.net>
On 2024-11-04 at 13:35:44, Taylor R Campbell wrote:
Show 14 quoted lines
> Thanks, can you expand on how this would work with the constraints I
> listed in my question?  Recapitulating:
> 
>    One option, of course, is to use a replicated file system like
>    glusterfs, or replicated block store like DRBD.  But that
> 
>    (a) likely requires a lot more round-trips than git push/send-pack,
>    (b) can't be used for replication to other git hosts like Github, and
>    (c) can't be used for other remote transports like git-cinnabar.
> 
> It sounds like rsyncing over ssh is incompatible with (b) and (c), but
> perhaps I misunderstood what you're getting at.  I tried to see if
> there is some way that reference-transaction hooks help me here but
> there wasn't anything obvious to me.

It should be noted that you cannot do what GitHub does with the three-phase commit with arbitrary remotes. A three-phase commit provides a prepared-to-commit stage where the backends agree that they (or at least a majority of them) will make the change. The Git protocol doesn't offer such functionality, so you can't use arbitrary remotes for this purpose. You'll need to either replicate to only hosts you control (as GitHub does), or you'll need to give up on having your three-phase commit operation.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Taylor R CampbellNext: Jeff King
Message 8 of 10 in “Synchronous replication on push”
  1. Taylor R CampbellNov 2, 2024
  2. Matěj CeplNov 2, 2024
  3. Taylor R CampbellNov 2, 2024
  4. brian m. carlsonNov 2, 2024
  5. Taylor R CampbellNov 4, 2024
  6. Konstantin RyabitsevNov 4, 2024
  7. Taylor R CampbellNov 4, 2024
  8. brian m. carlsonNov 4, 2024
  9. Jeff KingNov 4, 2024
  10. Taylor R CampbellNov 5, 2024

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.