apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.46k stars 979 forks source link

Fix ram estimate and its test for PackedInts.NullReader singleton #13250

Closed original-brownbear closed 3 months ago

original-brownbear commented 3 months ago

Correct estimate for singleton to return 0 and use custom accumulator in tests to fix assertions. Tried not doing this in #13232 but turns out we need a little complexity here since the singleton is recognized by the RamUsageTester in so far that is only counted once if it shows up repeatedly in an array or so.

fixes #13249