vigyasharma commented on PR #1012:
URL: https://github.com/apache/lucene/pull/1012#issuecomment-1179579087
Right, we can remove the TODO, as the calling thread in addIndexes now takes
care of cleaning up any pending non-CFS files. Updated the PR.
> did we change something that invalidated the comment ("they were never
registered ...")?
I just reworded it to "they are not tracked anymore"..
**Some overall context:**
Any partially created files from a write failure in `createCompoundFile()`
get cleaned up [inside that
method](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L5741-L5749).
When we return from createCompoundFile(), we just need to delete the old
non-CFS files. Since createCFS() resets `merge.info.files()`, on success, these
files become untracked. So we keep them in a local variable and delete them
directly. On failure, the calling thread in `addIndexes()` takes care of this
deletion.
--
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]