SevenCss commented on issue #7820: URL: https://github.com/apache/lucene/issues/7820#issuecomment-1706323759
> > Third off, there is possibly a separate improvement we could make to IndexWriter, to remove segments_N files before removing all other files when a commit point is deleted, to try to reduce the chance of an index getting into this state. That has a nice symmetry with how we write a commit (write various files first, and only when that succeeds do we write and fsync the segments_N referencing them). I'll open a follow-on issue for that. Let's focus for this issue on fixing this bug in CheckIndex. > > Oh, nevermind about this improvement -- this is [already how Lucene does it](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/util/FileDeleter.java#L212-L220)! Which makes it all the more mystifying how an index can get into this exotic form of corruption... @mikemccand Appreciated for your response. Glad to know that. I will have a try. :) -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org