You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Julie Tibshirani (Jira)" <ji...@apache.org> on 2022/05/10 04:13:00 UTC
[jira] [Created] (LUCENE-10564) SparseFixedBitSet#or doesn't update memory accounting
Julie Tibshirani created LUCENE-10564:
-----------------------------------------
Summary: SparseFixedBitSet#or doesn't update memory accounting
Key: LUCENE-10564
URL: https://issues.apache.org/jira/browse/LUCENE-10564
Project: Lucene - Core
Issue Type: Bug
Reporter: Julie Tibshirani
While debugging why a cache was using way more memory than expected, one of my colleagues noticed that {{SparseFixedBitSet#or}} doesn't update {{{}ramBytesUsed{}}}. Here's a unit test that demonstrates this:
{code:java}
public void testRamBytesUsed() throws IOException {
BitSet bitSet = new SparseFixedBitSet(1000);
long initialBytesUsed = bitSet.ramBytesUsed();
DocIdSetIterator disi = DocIdSetIterator.all(1000);
bitSet.or(disi);
assertTrue(bitSet.ramBytesUsed() > initialBytesUsed);
}
{code}
It also looks like we don't have any tests for {{SparseFixedBitSet}} memory accounting (unless I've missed them!) It'd be nice to add more coverage there too.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org