git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] perf: work around the tested repo having an index.lock
Date: Sat, 03 Jun 2017 08:52:16 +0900	[thread overview]
Message-ID: <xmqqd1amx80f.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170602184506.x2inwswmcwafyvfy@sigill.intra.peff.net> (Jeff King's message of "Fri, 2 Jun 2017 14:45:07 -0400")

Jeff King <peff@peff.net> writes:

> But I think a more compelling case is that there may be an ongoing
> operation in the original repo (e.g., say you are in the middle of
> writing a commit message) when we do a blind copy of the filesystem
> contents. You might racily pick up a lockfile.
>
> Should we find and delete all *.lock files in the copied directory? That
> would get ref locks, etc. Half-formed object files are OK. Technically
> if you want to get an uncorrupted repository you'd also want to copy
> refs before objects (in case somebody makes a new object and updates a
> ref while you're copying).
>
> I don't know how careful it's worth being. I don't really _object_ to
> this patch exactly, but it does seem like it's picking up one random
> case (that presumably you hit) and ignoring all of the related cases.

My feeling exactly.  Diagnosing and failing upfront saying "well you
made a copy but it is not suitable for testing" sounds more sensible
at lesat to me.

  parent reply	other threads:[~2017-06-02 23:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 10:33 [PATCH] perf: work around the tested repo having an index.lock Ævar Arnfjörð Bjarmason
2017-06-02 18:45 ` Jeff King
2017-06-02 20:12   ` Ævar Arnfjörð Bjarmason
2017-06-02 23:52   ` Junio C Hamano [this message]
2017-06-03 16:24     ` Ævar Arnfjörð Bjarmason
2017-06-04  0:00       ` Junio C Hamano
2017-06-04  0:51         ` Junio C Hamano
2017-06-04  7:37         ` Christian Couder
2017-06-04  7:55           ` Ævar Arnfjörð Bjarmason
2017-06-04  8:23             ` Jeff King
2017-06-05  2:02           ` Junio C Hamano
2017-06-05  6:25             ` Christian Couder
2017-06-04  8:29         ` Jeff King
2017-06-05  2:04           ` Junio C Hamano
2017-06-04  2:04   ` Junio C Hamano
2017-06-04  8:37     ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqd1amx80f.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).