From: Taylor Blau <ttaylorr@openai.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Toon Claes <toon@iotcl.com>,
git@vger.kernel.org, Gusted <gusted@codeberg.org>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH 2/4] revision: expose check for paths maybe changed in Bloom filter
Date: Fri, 17 Jul 2026 18:26:11 -0500 [thread overview]
Message-ID: <alq6E2oFH6JyYAay@com-79390> (raw)
In-Reply-To: <xmqqwlut1gzc.fsf@gitster.g>
On Fri, Jul 17, 2026 at 01:47:03PM -0700, Junio C Hamano wrote:
> > if (commit_graph_generation(commit) == GENERATION_NUMBER_INFINITY)
> > return -1;
> >
> > filter = get_bloom_filter(revs->repo, commit);
> > -
(This is an extreme nit-pick, but can we please try and avoid stray
changes like this? This one is not a huge deal, but it does make the
patch more difficult to read than necessary.)
> > if (!filter) {
> > count_bloom_filter_not_present++;
> > return -1;
> > }
> >
> > - for (size_t nr = 0; !result && nr < revs->bloom_keyvecs_nr; nr++) {
> > - result = bloom_filter_contains_vec(filter,
> > - revs->bloom_keyvecs[nr],
> > - revs->bloom_filter_settings);
> > - }
> > + result = revs_maybe_changed_in_bloom(revs, filter);
> > + if (result < 0)
> > + return result;
> >
> > if (result)
> > count_bloom_filter_maybe++;
>
> Doesn't this change skew the stats?
I believe so.
I had the same thinking, which is that without any key vectors, there is
no Bloom query to perform or account for, so that guard should stay
ahead of the generation and filter lookups.
> It could be that these two are intended "while at it we fix it too"
> improvements, but then they deserve to be mentioned in the proposed
> log message. Personally, I think the first one that increments the
> _not_present statistics when keyvecs is empty a bug, though.
It seems separable. It may be worth fixing, but I would mention it
explicitly in the commit message.
Thanks,
Taylor
next prev parent reply other threads:[~2026-07-17 23:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 15:46 [PATCH 0/4] last-modified: use the pathspec's Bloom key to pre-filter commits Toon Claes
2026-07-17 15:46 ` [PATCH 1/4] revision: move bloom keyvec precondition into function Toon Claes
2026-07-17 15:47 ` [PATCH 2/4] revision: expose check for paths maybe changed in Bloom filter Toon Claes
2026-07-17 20:47 ` Junio C Hamano
2026-07-17 23:26 ` Taylor Blau [this message]
2026-07-17 15:47 ` [PATCH 3/4] last-modified: check pathspec against Bloom filter first Toon Claes
2026-07-17 23:05 ` Taylor Blau
2026-07-17 15:47 ` [PATCH 4/4] last-modified: keep per-path Bloom filters for wildcard pathspecs Toon Claes
2026-07-17 19:16 ` Toon Claes
2026-07-17 23:18 ` Taylor Blau
2026-07-17 19:13 ` [PATCH 0/4] last-modified: use the pathspec's Bloom key to pre-filter commits Toon Claes
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=alq6E2oFH6JyYAay@com-79390 \
--to=ttaylorr@openai.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=gusted@codeberg.org \
--cc=peff@peff.net \
--cc=toon@iotcl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.