-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Subclass NIOFSDirectory instead of using FileSwitchDirectory #37140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We don't want two FSDirectories manage pending deletes separately and optimze file listing. This confuses IndexWriter and causes exceptions when files are deleted twice but are pending for deletion. This change move to using a NIOFS subclass that only delegates to MMAP for opening files all metadata and pending deletes are managed on top. Closes elastic#37111 Relates to elastic#36668
Pinging @elastic/es-distributed |
@danielmitterdorfer can you include this if you backport #36668 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix. I left some comments.
server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java
Outdated
Show resolved
Hide resolved
The change has already been backported in #37067 but I can take care of backporting this PR here to 6.x. |
@danielmitterdorfer I pushed changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a nit but apart from that LGTM. No need for another round. Thanks!
server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fishy!
We don't want two FSDirectories manage pending deletes separately and optimize file listing. This confuses IndexWriter and causes exceptions when files are deleted twice but are pending for deletion. This change move to using a NIOFS subclass that only delegates to MMAP for opening files all metadata and pending deletes are managed on top. Closes #37111 Relates to #36668
We don't want two FSDirectories manage pending deletes separately
and optimze file listing. This confuses IndexWriter and causes exceptions
when files are deleted twice but are pending for deletion. This change
move to using a NIOFS subclass that only delegates to MMAP for opening files
all metadata and pending deletes are managed on top.
Closes #37111
Relates to #36668