Skip to content

Remove usage of FileSwitchDirectory #42937

Merged
s1monw merged 13 commits intoelastic:masterfrom
s1monw:fix_preload
Jun 12, 2019
Merged

Remove usage of FileSwitchDirectory #42937
s1monw merged 13 commits intoelastic:masterfrom
s1monw:fix_preload

Conversation

@s1monw
Copy link
Copy Markdown
Contributor

@s1monw s1monw commented Jun 6, 2019

We are still using FileSwitchDirectory in the case a user configures file based pre-load of mmaps. This is trappy for multiple reasons if the both directories used by FileSwitchDirectory point to the same filesystem directory. One issue is LUCENE-8835 that cause issues like #37111 - unless LUCENE-8835 isn't fixed we should not use it in elasticsearch. Instead we use a similar trick as we use for HybridFS and subclass mmap directory directly.

@s1monw s1monw added >bug :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. v8.0.0 v7.2.0 labels Jun 6, 2019
@s1monw s1monw requested a review from jpountz June 6, 2019 11:57
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed

@jasontedor jasontedor added v7.3.0 and removed v7.2.0 labels Jun 7, 2019
@s1monw
Copy link
Copy Markdown
Contributor Author

s1monw commented Jun 11, 2019

this becomes even more pressing with https://issues.apache.org/jira/browse/LUCENE-8853

Copy link
Copy Markdown
Contributor

@jimczi jimczi 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 one question, LGTM otherwise

@s1monw s1monw merged commit 62620f2 into elastic:master Jun 12, 2019
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Jun 12, 2019
s1monw added a commit that referenced this pull request Jun 12, 2019
We are still using `FileSwitchDirectory` in the case a user configures file based pre-load of mmaps. This is trappy for multiple reasons if the both directories used by `FileSwitchDirectory` point to the same filesystem directory. One issue is LUCENE-8835 that cause issues like #37111 - unless LUCENE-8835 isn't fixed we should not use it in elasticsearch. Instead we use a similar trick as we use for HybridFS and subclass mmap directory directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. v7.3.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants