git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Taylor R Campbell <git@campbell.mumble.net>
Cc: "Matěj Cepl" <mcepl@cepl.eu>, git@vger.kernel.org
Subject: Re: Synchronous replication on push
Date: Mon, 4 Nov 2024 22:36:20 +0000	[thread overview]
Message-ID: <ZylMZGLdwVDFcAwF@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <20241104133544.A04D760A95@jupiter.mumble.net>

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

On 2024-11-04 at 13:35:44, Taylor R Campbell wrote:
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  parent reply	other threads:[~2024-11-04 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02  2:06 Synchronous replication on push Taylor R Campbell
2024-11-02 10:09 ` Matěj Cepl
2024-11-02 13:35   ` Taylor R Campbell
2024-11-02 14:49     ` brian m. carlson
2024-11-04 13:35       ` Taylor R Campbell
2024-11-04 14:40         ` Konstantin Ryabitsev
2024-11-04 15:50           ` Taylor R Campbell
2024-11-04 22:36         ` brian m. carlson [this message]
2024-11-04 23:47 ` Jeff King
2024-11-05  1:34   ` Taylor R Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZylMZGLdwVDFcAwF@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@campbell.mumble.net \
    --cc=git@vger.kernel.org \
    --cc=mcepl@cepl.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).