[ 
https://issues.apache.org/jira/browse/LUCENE-10564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17536400#comment-17536400
 ] 

ASF subversion and git services commented on LUCENE-10564:
----------------------------------------------------------

Commit 6e3b7bc52240d9601240a4e99c6f9b6fe12b2f33 in lucene's branch 
refs/heads/branch_9x from Julie Tibshirani
[ https://gitbox.apache.org/repos/asf?p=lucene.git;h=6e3b7bc5224 ]

LUCENE-10564: Fix errorprone warning

This slipped through in the original commit because we only enable errorprone on
nightly runs.


> 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
>            Priority: Minor
>             Fix For: 9.2
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to