Description
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:
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); }
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.
Attachments
Issue Links
- links to