stefanvodita commented on code in PR #13017:
URL: https://github.com/apache/lucene/pull/13017#discussion_r1507272812


##########
lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java:
##########
@@ -782,13 +784,17 @@ synchronized MergePolicy.MergeReader 
getReaderForMerge(IOContext context) throws
     }
 
     SegmentReader reader = getReader(context);
-    if (pendingDeletes.needsRefresh(reader)) {
+    if (pendingDeletes.needsRefresh(reader)
+        || reader.getSegmentInfo().getDelGen() != 
pendingDeletes.info.getDelGen()) {

Review Comment:
   Thank you for the thorough explanation, it's really useful!



-- 
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