kkewwei opened a new pull request, #17053:
URL: https://github.com/apache/lucene/pull/17053

   ### Description
   
   For example, segments`a` and`b` are merged into`c` .
   
   
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L5484
   When reader pooling is disabled, releasing`a` during merge cleanup can flush 
its pending DocValues updates to disk. This write is unnecessary because`a` has 
already been merged away.
   
   The write triggers`checkpointNoSIS()` . Since both`a` and`b` have already 
been removed from`segmentInfos` , the checkpoint decrements the references 
to`b` ’s existing DV update files and may delete them prematurely.
   
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L6882
   
   When`b` is subsequently released, flushing its pending DV updates needs to 
read those deleted files to fold the existing deltas, 
causing`FileNotFoundException` .
   
   Resolved #17048.
   
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   


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