From: Tony Lindgren <tony@atomide.com>
To: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
Linus Torvalds <torvalds@osdl.org>,
Thomas Glanzmann <sithglan@stud.uni-erlangen.de>,
Nicolas Pitre <nico@cam.org>, Tony Lindgren <tony@atomide.com>,
git@vger.kernel.org
Subject: Re: [SCRIPT] cg-rpush & locking
Date: Thu, 2 Jun 2005 00:32:05 -0700 [thread overview]
Message-ID: <20050602073205.GA31482@muru.com> (raw)
In-Reply-To: <20050602071453.GA16616@kiste.smurf.noris.de>
On Thu, Jun 02, 2005 at 09:14:53AM +0200, Matthias Urlichs wrote:
> Hi,
>
> Daniel Barkalow:
> > If the lock is only to protect against someone else modifying HEAD after
> > we've checked that it is our starting point and before we modify it,
> > there's no reason not to hold the lock while pushing; it wouldn't block
> > anything other than someone doing a quick push in the middle of our long
> > one, and thereby causing us to dump a lot of useless objects on the
> > server (which will become obsolete as we will need to do the merge and
> > push a different version).
> >
> The objects we push aren't going to be obsolete. The server needs them
> anyway, because our HEAD refers to them.
I don't think locking for the duration of the push really is a problem.
It is unlikely that there would be so many people pushing that it would
cause inconvenience... Of course it would be nice to optimize it if
possible.
> What if the connection dies in the middle of a push? You then sit there
> waiting for it, and the lock, to time out. OTOH, an atomic cmpxchg on
> the server can't block and can't timeout.
>
> > you want to have the
> > client watch for the resolution of the other transfer one way or the
> > other, since you're in the current state precisely because you lost on
> > getting the lock and now definitely need the next version.
> >
> I disagree. Given that you need to wait for the upload to finish anyway
> (whether you know it or not ;-) it makes sense to spend the time
> actually uploading -- upload speed is frequently lower than download
> for individuals.
I would assume the biggest problem for most people is how they can push
through a firewall. From that point of view it would make sense to do
the push as a cgi script rather than something over ssh. And with a
cgi script you can of course optimize the locking and use tmp files
before renaming which are a bit hard to do with rsync.
Tony
next prev parent reply other threads:[~2005-06-02 7:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-31 19:00 [SCRIPT] cg-rpush & locking Tony Lindgren
2005-05-31 23:16 ` Nicolas Pitre
2005-06-01 6:51 ` Thomas Glanzmann
2005-06-01 16:55 ` Tony Lindgren
2005-06-02 2:58 ` Linus Torvalds
2005-06-02 6:39 ` Daniel Barkalow
2005-06-02 7:14 ` Matthias Urlichs
2005-06-02 7:32 ` Tony Lindgren [this message]
2005-06-02 10:04 ` Matthias Urlichs
2005-06-02 14:50 ` Linus Torvalds
2005-06-02 17:54 ` Tony Lindgren
2005-06-02 19:12 ` Daniel Barkalow
2005-06-02 19:15 ` Dan Holmsand
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=20050602073205.GA31482@muru.com \
--to=tony@atomide.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=nico@cam.org \
--cc=sithglan@stud.uni-erlangen.de \
--cc=smurf@smurf.noris.de \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.