s1monw commented on a change in pull request #1389: LUCENE-9298: fix 
clearDeletedDocIds in BufferedUpdates
URL: https://github.com/apache/lucene-solr/pull/1389#discussion_r405796843
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/BufferedUpdates.java
 ##########
 @@ -176,8 +176,11 @@ void addBinaryUpdate(BinaryDocValuesUpdate update, int 
docIDUpto) {
   }
 
   void clearDeleteTerms() {
-    deleteTerms.clear();
     numTermDeletes.set(0);
+    deleteTerms.forEach((term, docIDUpto) -> {
 
 Review comment:
   Instead of counting this here on clear, can we use a second counter for the 
deleteTerms next to `bytesUsed`? This would be great. It doesn't need to be 
thread safe IMO

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to