epotyom commented on code in PR #16046:
URL: https://github.com/apache/lucene/pull/16046#discussion_r3297379484


##########
lucene/CHANGES.txt:
##########
@@ -184,6 +184,8 @@ Bug Fixes
 
 * GITHUB#15939: Fix thread-safety issues with NFARunAutomaton. (Dimitris 
Rempapis)
 
+* GITHUB#16046: Fix double-counting of underlying Automaton in 
CompiledAutomaton#ramBytesUsed. (Eugene Rizhkov)

Review Comment:
   The change can be backported to 10.5.0, right? If yes, let's move this to 
the 10.5.0 section?



##########
lucene/core/src/java/org/apache/lucene/util/automaton/CompiledAutomaton.java:
##########
@@ -535,8 +535,8 @@ public boolean equals(Object obj) {
 
   @Override
   public long ramBytesUsed() {
+    // this.automaton is accounted via runAutomaton.ramBytesUsed()

Review Comment:
   Nice catch! Maybe worth adding a unit test?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to