From: Taylor Blau <me@ttaylorr.com>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: git@vger.kernel.org
Subject: Re: Repository corruption if objects pushed in the middle of repack
Date: Mon, 13 Jun 2022 17:36:43 -0400 [thread overview]
Message-ID: <Yqet68Sll1cz+ySY@nand.local> (raw)
In-Reply-To: <20220613213221.iekmfjihho5ujfq2@meerkat.local>
On Mon, Jun 13, 2022 at 05:32:21PM -0400, Konstantin Ryabitsev wrote:
> On Mon, Jun 13, 2022 at 05:24:27PM -0400, Taylor Blau wrote:
> > A much more likely explanation for what is going on has to do with the
> > `--unpack-unreachable` option you're using.
> >
> > In your example, any unreachable object written within the last day is
> > written loose, and anything else older than that is simply discarded. If
> > the following happens, in order:
> >
> > - an unreachable object is detected, and marked for deletion
> > - that object then becomes reachable via some ref-update
> > - then the object becomes an ancestor of some push which depends on it
> > - _then_ the object is deleted by repack
> >
> > ...then the repository will be missing some objects which are in its
> > reachable set, and thus corrupt. IOW, the `--unpack-unreachable` option
> > (and its successor, cruft packs) are both racy with respect to
> > ref-updates.
> >
> > Are you able to find evidence of that race in your logging? I would bet
> > that is likely what is going on here.
>
> I'm not sure that's the case, because the object that is missing is the one
> that didn't exist before the repack started. In the scenario you describe, the
> pre-existing unreachable ancestor of it would be missing, not the newly
> incoming object. Right?
Aren't we reporting that the newly pushed tree was broken _because_ it
had some links to sub-trees that no longer existed?
Thanks,
Taylor
next prev parent reply other threads:[~2022-06-13 21:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 20:31 Repository corruption if objects pushed in the middle of repack Konstantin Ryabitsev
2022-06-13 21:18 ` Taylor Blau
2022-06-13 21:24 ` Taylor Blau
2022-06-13 21:32 ` Konstantin Ryabitsev
2022-06-13 21:36 ` Taylor Blau [this message]
2022-06-13 21:45 ` Konstantin Ryabitsev
2022-06-13 22:26 ` Chris Torek
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=Yqet68Sll1cz+ySY@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=konstantin@linuxfoundation.org \
/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