From: Nasser Grainawi <nasser@codeaurora.org>
To: Jeff King <peff@peff.net>
Cc: Scott Sandler <scott.m.sandler@gmail.com>, git@vger.kernel.org
Subject: Re: Git push race condition?
Date: Mon, 24 Mar 2014 16:59:57 -0600 [thread overview]
Message-ID: <557DE2F7-1024-42A5-8192-ACE910CE6C81@codeaurora.org> (raw)
In-Reply-To: <20140324225434.GB17080@sigill.intra.peff.net>
On Mar 24, 2014, at 4:54 PM, Jeff King <peff@peff.net> wrote:
> On Mon, Mar 24, 2014 at 03:18:14PM -0400, Scott Sandler wrote:
>
>> I've noticed that a few times in the past several weeks, we've had
>> events where pushes have been lost when two people pushed at just
>> about the same time. The scenario is that two users both have commits
>> based on commit A, call them B and B'. The user with commit B pushes
>> at about the same time as the user who pushes B'. Both pushes are
>> determined to be fast-forwards and both succeed, but B' overwrites B
>> and B is no longer on origin/master. The server does have B in its
>> .git directory but the commit isn't on any branch.
>
> What version of git are you running on the server? Is it possible that
> there is a simultaneous process running `git pack-refs` (e.g., a `git
> gc` run by a cron job or similar)?
`git gc --auto` could be getting triggered as well, so if you suspect
that you could set gc.auto=0 on the server side.
>
> There were some race conditions fixed last year wherein git could see
> stale values of refs, but I do not think they could impact writing to a
> ref like this. When we take the lock on the ref, we always go straight
> to the filesystem, so the value we see is up-to-date.
>
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora
Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2014-03-24 23:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 19:18 Git push race condition? Scott Sandler
2014-03-24 19:44 ` Matthieu Moy
2014-03-24 20:01 ` Scott Sandler
2014-03-24 22:09 ` Matthieu Moy
2014-03-24 22:44 ` Junio C Hamano
2014-03-24 21:16 ` Ævar Arnfjörð Bjarmason
2014-03-24 21:29 ` Scott Sandler
2014-03-24 22:51 ` Jeff King
2014-03-24 22:54 ` Jeff King
2014-03-24 22:59 ` Nasser Grainawi [this message]
2014-03-25 13:45 ` Scott Sandler
2014-03-25 14:03 ` Matthieu Moy
2014-03-25 14:16 ` Scott Sandler
2014-03-25 14:22 ` Matthieu Moy
2014-03-25 14:57 ` Jeff King
2014-04-10 19:14 ` Scott Sandler
2014-04-11 7:46 ` Matthieu Moy
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=557DE2F7-1024-42A5-8192-ACE910CE6C81@codeaurora.org \
--to=nasser@codeaurora.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=scott.m.sandler@gmail.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 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.