git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] perf: work around the tested repo having an index.lock

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 4, 2017, 07:55 UTC
Message-ID
<CACBZZX4eCJJS6iaod+tWFF5M998Y5x88SdYR2ZekAJeeOiU8ug@mail.gmail.com>
In-Reply-To
<CAP8UFD1u-C-T2X+H8WxxB7O+ajcGfygRBLN0t7+zJcOh_SrvFQ@mail.gmail.com>

On Sun, Jun 4, 2017 at 9:37 AM, Christian Couder <christian.couder@gmail.com> wrote:

Show 41 quoted lines
> On Sun, Jun 4, 2017 at 2:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>>> 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.
>>>
>>> This change makes the repo suitable for testing when it wasn't before.
>>
>> Perhaps "not suitable" was a bit too vague.
>>
>> The copy you made is not in a consistent state that is good for
>> testing.  This change may declare that it is now in a consistent
>> state, but removal of a single *.lock file does not make it so.  We
>> do not know what other transient inconsistency the resulting copy
>> has; it is inherent to git-unaware copy---that is why we discouraged
>> and removed rsync transport after all.
>
> If we don't like git-unaware copies, maybe we should go back to the
> reasons why we are making one here.
> In 342e9ef2d9 (Introduce a performance testing framework, 2012-02-17),
> Thomas wrote:
>
>     3. Creating test repos from scratch in every test is extremely
>        time-consuming, and shipping or downloading such large/weird repos
>        is out of the question.
>
>        We leave this decision to the user.  Two different sizes of test
>        repos can be configured, and the scripts just copy one or more of
>        those (using hardlinks for the object store).  By default it tries
>        to use the build tree's git.git repository.
>
>        This is fairly fast and versatile.  Using a copy instead of a clone
>        preserves many properties that the user may want to test for, such
>        as lots of loose objects, unpacked refs, etc.
>
> Is a local clone really much slower these days? Wouldn't it is use
> hard links too?
> By the way the many properties that are preserved might not be worth
> preserving as they could make results depend a lot on the current
> state of the original repo.

AFAICT from some quick testing it'll hardlink the objects/ dir, so e.g. you preserve the loose objects. Making the results depend on the state of the original repo is a feature, but perhaps it should be opt in. It's very useful to be able to take a repo that's accrued e.g. a month's worth of refs & loose objects and test that v.s. a fresh clone.

But there are other things that ever a hardlink local clone doesn't preserve which might be worth preserving...

Previous: Christian CouderNext: Jeff King
Message 9 of 16 in “perf: work around the tested repo having an index.lock”
  1. perf: work around the tested repo having an index.lockÆvar Arnfjörð Bjarmason, Jun 2, 2017
  2. Jeff KingJun 2, 2017
  3. Ævar Arnfjörð BjarmasonJun 2, 2017
  4. Junio C HamanoJun 2, 2017
  5. Ævar Arnfjörð BjarmasonJun 3, 2017
  6. Junio C HamanoJun 4, 2017
  7. Junio C HamanoJun 4, 2017
  8. Christian CouderJun 4, 2017
  9. Ævar Arnfjörð BjarmasonJun 4, 2017
  10. Jeff KingJun 4, 2017
  11. Junio C HamanoJun 5, 2017
  12. Christian CouderJun 5, 2017
  13. Jeff KingJun 4, 2017
  14. Junio C HamanoJun 5, 2017
  15. Junio C HamanoJun 4, 2017
  16. Jeff KingJun 4, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.