From: Michael Haggerty <mhagger@alum.mit.edu>
To: Ronnie Sahlberg <sahlberg@google.com>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] Use ref transactions for fetch
Date: Mon, 05 May 2014 13:22:43 +0200 [thread overview]
Message-ID: <53677483.4050409@alum.mit.edu> (raw)
In-Reply-To: <1398192327-21302-1-git-send-email-sahlberg@google.com>
On 04/22/2014 08:45 PM, Ronnie Sahlberg wrote:
> This change is based on the previous ref transaction patches.
> This is sent as a separate patch series since it implements a lot more
> non-trivial changes to the behaviour than the previous patches and thus can
> use more detailed review.
>
> Update fetch.c to use ref transactions when performing updates. Use a single
> ref transaction for all updates and only commit the transaction if all other
> checks and oeprations have been successful. This makes the ref updates during
> a fetch (mostly) atomic.
Is this always an improvement? What kind of checks are there that might
fail?
It would be pretty annoying to spend a lot of time fetching a big pack,
only to have the fetch fail because one reference out of many couldn't
be updated. This would force the user to download the entire pack
again, whereas if the successful reference updates had been allowed,
then probably most or all of the second download would have been avoidable.
On the other hand, if a reference was renamed on the remote side,
allowing a partial reference update could cause history to be discarded
locally if the old name's delete was accepted but the new name's
addition was rejected. This wouldn't be the end of the world, because
the history is presumably still available remotely to fetch again, but
it's not ideal either.
I'm not sure myself what I would prefer, but I wanted to point out that
it is IMO not obvious that atomicity here is an improvement.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next prev parent reply other threads:[~2014-05-06 16:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-22 18:45 [PATCH 0/3] Use ref transactions for fetch Ronnie Sahlberg
2014-04-22 18:45 ` [PATCH 1/3] fetch.c: clear errno before calling functions that might set it Ronnie Sahlberg
2014-04-23 20:12 ` Eric Sunshine
2014-04-24 15:21 ` Ronnie Sahlberg
2014-04-22 18:45 ` [PATCH 2/3] fetch.c: change s_update_ref to use a ref transaction Ronnie Sahlberg
2014-04-23 20:12 ` Eric Sunshine
2014-04-24 15:22 ` Ronnie Sahlberg
2014-04-22 18:45 ` [PATCH 3/3] fetch.c: use a single ref transaction for all ref updates Ronnie Sahlberg
2014-04-23 20:17 ` Eric Sunshine
2014-04-24 15:23 ` Ronnie Sahlberg
2014-05-05 11:22 ` Michael Haggerty [this message]
2014-05-05 15:08 ` [PATCH 0/3] Use ref transactions for fetch Ronnie Sahlberg
2014-05-06 18:40 ` Junio C Hamano
2014-05-06 20:53 ` Michael Haggerty
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=53677483.4050409@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=sahlberg@google.com \
/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).