You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/09/04 11:08:04 UTC

[GitHub] [lucene] iamorchid opened a new issue, #11751: DV updates files used by a merge could be deleted by other concurrent flushes

iamorchid opened a new issue, #11751:
URL: https://github.com/apache/lucene/issues/11751

   https://github.com/apache/lucene/blob/84cae4f27cfd3feb3bb42d5a9f7ce034f7a31573/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L5075
   
   For merge, I see that the following logic are used to initialize SegmentReader for the merge. Though segments covered in a merge won't be deleted in other concurrent merges, DV updates files could still be overridden by other concurrent flush and then be deleted after the flush performs IndexFileDeleter#checkpoint(). Though for systems like linux, this won't be a big issue (as an opened file could still be read in process even if it's been deleted). However, for windows, the delete operation would be rejected if the file is still open. So I think a more sensible way is increase the refcount in IndexFileDeleter for the files reference by the merge.
   ```
         merge.initMergeReaders(
             sci -> {
               final ReadersAndUpdates rld = getPooledInstance(sci, true);
               rld.setIsMerging();
               return rld.getReaderForMerge(context);
             });
   ```


-- 
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: issues-unsubscribe@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] DV updates files used by a merge could be deleted by other concurrent flushes [lucene]

Posted by "stefanvodita (via GitHub)" <gi...@apache.org>.
stefanvodita closed issue #11751: DV updates files used by a merge could be deleted by other concurrent flushes
URL: https://github.com/apache/lucene/issues/11751


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] DV updates files used by a merge could be deleted by other concurrent flushes [lucene]

Posted by "stefanvodita (via GitHub)" <gi...@apache.org>.
stefanvodita commented on issue #11751:
URL: https://github.com/apache/lucene/issues/11751#issuecomment-1976423397

   Thanks for the bug report @iamorchid! @guojialiang92 solved this in #13017. 


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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