From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jan 2024, #01; Tue, 2)
Date: Tue, 16 Jan 2024 18:31:19 -0500 [thread overview]
Message-ID: <ZacRx1rbESvYiVgN@nand.local> (raw)
In-Reply-To: <xmqqfrywyk16.fsf@gitster.g>
On Tue, Jan 16, 2024 at 02:45:41PM -0800, Junio C Hamano wrote:
> Taylor Blau <me@ttaylorr.com> writes:
>
> > OK, everything seems fine thus far, until we inspect the value of
> > g->bloom_filter_settings, which is NULL, becuase of this hunk from
> > commit-graph.c::graph_read_bloom_data():
> >
> > if (hash_version != 1)
> > return 0;
> >
> > which terminates the function before we assign g->bloom_filter_settings
> > for the existing (written with v2 Bloom filters) graph layer.
> >
> > I don't think that there is a way to fix this in a backwards compatible
> > way, but I'm comfortable with that in this instance since we don't
> > expect users to upgrading to v2 Bloom filters and then writing new graph
> > layers using a non-v2 compatible version of Git.
>
> A big red button solution to avoid this would be to uprev the
> repository format version once you start writing v2 Bloom filters
> anywhere in the layers. That way, existing Git clients would not be
> able to touch it. I do not know if the cure is more severe than the
> disease in that case, though.
I tend to think that in this case the cure is probably worse than the
disease. I expect it to be extremely rare that a user would upgrade to a
modern version of Git, write commit-graphs, then downgrade, and try to
write more commit-graphs.
> In any case, at least, we should be able to prepare the code that we
> teach to grok v2 today so that they do not trigger the same segfault
> when they see a commit graph layer containing v3 Bloom filters (or
> later). Then we won't have to have the same conversation when we
> somehow need to update Bloom filters again.
This series should accomplish that by loading the Bloom chunk
unconditionally, and only reading its filters when they match the
given hash_version.
Thanks,
Taylor
next prev parent reply other threads:[~2024-01-16 23:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 1:02 What's cooking in git.git (Jan 2024, #01; Tue, 2) Junio C Hamano
2024-01-03 5:53 ` ps/refstorage-extension (was: What's cooking in git.git (Jan 2024, #01; Tue, 2)) Patrick Steinhardt
2024-01-03 9:01 ` What's cooking in git.git (Jan 2024, #01; Tue, 2) Jeff King
2024-01-03 16:37 ` Junio C Hamano
2024-01-05 8:59 ` Jeff King
2024-01-05 16:34 ` Junio C Hamano
2024-01-03 17:14 ` René Scharfe
2024-01-03 16:43 ` Taylor Blau
2024-01-03 18:08 ` Junio C Hamano
2024-01-13 18:35 ` SZEDER Gábor
2024-01-13 22:06 ` Taylor Blau
2024-01-13 23:41 ` SZEDER Gábor
2024-01-16 20:37 ` Taylor Blau
2024-02-25 22:59 ` SZEDER Gábor
2024-02-26 14:44 ` Taylor Blau
2024-01-13 22:51 ` SZEDER Gábor
2024-01-16 20:49 ` Taylor Blau
2024-01-16 22:45 ` Junio C Hamano
2024-01-16 23:31 ` Taylor Blau [this message]
2024-01-16 23:42 ` 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
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=ZacRx1rbESvYiVgN@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder.dev@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.
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).