Re: [PATCH 10/12] bloom: encode out-of-bounds filters as non-empty
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Sep 10, 2020, 03:35 UTC
- Message-ID
- <20200910033557.GA2178@nand.local>
- In-Reply-To
- <1c993b83980e77594b0de2b1884cbc4cf484f9ab.1599664389.git.me@ttaylorr.com>
On Wed, Sep 09, 2020 at 11:23:48AM -0400, Taylor Blau wrote:
Show 8 quoted lines
> - filter->data = NULL; > - filter->len = 0; > + filter->data = xmalloc(1); > + filter->data[0] = 0xFF; > + filter->len = 1; > > if (computed) > *computed |= BLOOM_TRUNC_LARGE;
Oops, I missed the case that added by the previous patch where the number of diff entries is smaller than the limit, but the hashmap entries (after directories are added and such) crosses the threshold.
Specifically, this patch doesn't write the 0xFF filter like it should. I'll send a different version of this patch tomorrow.
Thanks, Taylor