From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Taylor Blau" <me@ttaylorr.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Derrick Stolee" <derrickstolee@github.com>,
git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: tb/cruft-packs (was Re: What's cooking in git.git (Mar 2022, #01; Thu, 3))
Date: Mon, 7 Mar 2022 19:49:14 -0500 [thread overview]
Message-ID: <YiaoCivdcT3QE24f@nand.local> (raw)
In-Reply-To: <xmqqv8wpp9ws.fsf@gitster.g>
On Mon, Mar 07, 2022 at 04:25:55PM -0800, Junio C Hamano wrote:
> > If there are other benefits you had in mind, I'm curious to hear them.
> > But I think we should be fine to "lock in" the first version of the
> > .mtimes format since we have an easy-ish mechanism to change it in the
> > future.
>
> Hmph, how? For example, if it turns out that rewriting .mtimes file
> for each object access turns out to be too much I/O churn and the
> approach to use the mtime of the cruft pack for expiration of the
> entire cruft pack (while ejecting objects that was used from the
> cruft pack out of it to resurrect them from expiration schedule) is
> more preferrable, how do we back out of from the "lock in" once this
> series is unleashed to the workd?
(Note that this series does not propose rewriting the .mtimes file
during each object access, since we only need to update our view of
"last modified time" when pruning or repacking. I think a more complete
explanation of why can be found in [1] and [2]).
That detail aside, if we suddenly decided that cruft packs were a bad
idea and we should get rid of them, then we would be fine to drop all of
the cruft pack code. A future version of Git that didn't understand
cruft packs would ignore the .mtimes file, and we would go back to
handling unreachable objects as we do today (by ejecting them loose when
pruning a too-new object that hasn't fallen out of the grace period).
In other words, this series is designed intentionally so that older
versions of Git that don't understand cruft packs will continue to work
fine even in the presence of cruft packs. If we backed out of cruft
packs at a later date, it would be no different than using an older
version of Git that predates cruft packs.
In other words, I think Stolee's comparison to a feature like
commit-graphs (where older versions of Git that don't yet understand
commit-graphs work just fine even in repositories that have
commit-graphs written) is applicable to this series, too.
Thanks,
Taylor
[1]: https://lore.kernel.org/git/Yap5INmX2ACfjoda@nand.local/
[2]: https://lore.kernel.org/git/YaqCZ7BPwuMGmkZY@nand.local/
next prev parent reply other threads:[~2022-03-08 0:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 4:31 What's cooking in git.git (Mar 2022, #01; Thu, 3) Junio C Hamano
2022-03-04 13:25 ` ab/plug-random-leaks (was Re: What's cooking in git.git (Mar 2022, #01; Thu, 3)) Derrick Stolee
2022-03-04 18:33 ` Ævar Arnfjörð Bjarmason
2022-03-17 12:46 ` [PATCH] tests: test show --word-diff --color-moved Michael J Gruber
2022-03-17 14:55 ` [PATCH v2 0/2] diff.c: fix a recent memory leak regression Ævar Arnfjörð Bjarmason
2022-03-17 14:55 ` [PATCH v2 1/2] tests: demonstrate "show --word-diff --color-moved" regression Ævar Arnfjörð Bjarmason
2022-03-17 15:54 ` Junio C Hamano
2022-03-17 14:55 ` [PATCH v2 2/2] diff.c: fix a double-free regression in a18d66cefb Ævar Arnfjörð Bjarmason
2022-03-04 15:35 ` tb/cruft-packs (was Re: What's cooking in git.git (Mar 2022, #01; Thu, 3)) Derrick Stolee
2022-03-07 18:06 ` Jonathan Nieder
2022-03-07 18:18 ` Taylor Blau
2022-03-07 18:32 ` Derrick Stolee
2022-03-07 20:18 ` Jonathan Nieder
2022-03-07 20:51 ` Derrick Stolee
2022-03-07 21:34 ` Junio C Hamano
2022-03-08 0:52 ` Taylor Blau
2022-03-08 0:25 ` Junio C Hamano
2022-03-08 0:49 ` Taylor Blau [this message]
2022-03-05 14:25 ` jc/stash-drop (was: " Ævar Arnfjörð Bjarmason
2022-03-07 18:22 ` jc/stash-drop Junio C Hamano
2022-03-07 13:49 ` ds/commit-graph-gen-v2-fixes (was Re: What's cooking in git.git (Mar 2022, #01; Thu, 3)) Derrick Stolee
2022-03-07 17:18 ` Junio C Hamano
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=YiaoCivdcT3QE24f@nand.local \
--to=me@ttaylorr.com \
--cc=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@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 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).