Skip to content

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

Merged
merged 4 commits into from
Jan 5, 2019

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jan 4, 2019

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

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
@s1monw s1monw added >bug v7.0.0 :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. labels Jan 4, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@s1monw
Copy link
Contributor Author

s1monw commented Jan 4, 2019

@danielmitterdorfer can you include this if you backport #36668

Copy link
Member

@danielmitterdorfer danielmitterdorfer left a 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.

@danielmitterdorfer
Copy link
Member

danielmitterdorfer commented Jan 4, 2019

@danielmitterdorfer can you include this if you backport #36668

The change has already been backported in #37067 but I can take care of backporting this PR here to 6.x.

@s1monw
Copy link
Contributor Author

s1monw commented Jan 4, 2019

@danielmitterdorfer I pushed changes

Copy link
Member

@danielmitterdorfer danielmitterdorfer left a 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!

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fishy!

@s1monw s1monw merged commit 0cc8770 into elastic:master Jan 5, 2019
@s1monw s1monw deleted the fix_37111 branch January 5, 2019 09:15
s1monw added a commit that referenced this pull request Jan 5, 2019
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
kovrus added a commit to crate/crate that referenced this pull request Sep 9, 2019
kovrus added a commit to crate/crate that referenced this pull request Sep 9, 2019
mergify bot pushed a commit to crate/crate that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants