Description
Description
AutomatonQuery#ramBytesUsed adds automaton.ramBytesUsed() and
compiled.ramBytesUsed() unconditionally:
this.ramBytesUsed =
BASE_RAM_BYTES + term.ramBytesUsed() + automaton.ramBytesUsed() + compiled.ramBytesUsed();
The over-report equals automaton.ramBytesUsed() exactly.
ramBytesUsed() feeds LRUQueryCache eviction decisions; over-reporting causes premature evictions.
Same bug shape as #16046, which fixed the analogous double-count inside CompiledAutomaton itself.
Version and environment details
Lucene: main (Version.LATEST = LUCENE_11_0_0), commit 2b23728
Also present in: 10.x and 9.x branches
JDK / OS: reproducible on any supported JDK/OS — the bug is in pure Java accounting logic
Description
Description
AutomatonQuery#ramBytesUsedaddsautomaton.ramBytesUsed()andcompiled.ramBytesUsed()unconditionally:The over-report equals automaton.ramBytesUsed() exactly.
ramBytesUsed() feeds LRUQueryCache eviction decisions; over-reporting causes premature evictions.
Same bug shape as #16046, which fixed the analogous double-count inside CompiledAutomaton itself.
Version and environment details
Lucene: main (Version.LATEST = LUCENE_11_0_0), commit 2b23728
Also present in: 10.x and 9.x branches
JDK / OS: reproducible on any supported JDK/OS — the bug is in pure Java accounting logic