zhaih opened a new pull request, #12126: URL: https://github.com/apache/lucene/pull/12126
### Description See #11885 ### Approach I extracted mainly the ref counting part into the new `FileDeleter` so that both `IndexFileDeleter` and `ReplicaFileDeleter` will use it as a component. It does not provide any level of thread-safety since the `IndexFileDeleter` originally was implemented in a lock-free way, so the user of this new `FileDeleter` is responsible for the synchronization if necessary. ### Test I haven't written any specific test for this since I feel like the existing tests (mainly `TestIndexFileDeleter`) should already provide a good coverage <!-- 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: 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