Skip to content
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

Improve "directory cannot be listed" message to reflect underlying cause #8284

Closed
clintongormley opened this issue Oct 30, 2014 · 2 comments
Closed
Labels
:Core/Infra/Core Core issues without another label discuss >enhancement

Comments

@clintongormley
Copy link
Contributor

In #7954 (comment), @drewr saw the following error message:

[2014-10-24 21:28:48,949][WARN ][index.engine.internal    ] [ops27-data04-A] [foo][31] failed engine [merge exception]
org.apache.lucene.index.MergePolicy$MergeException: java.io.IOException: directory '/d/es/data/ops27-data04-A/org.elasticsearch.test.ops27.data/nodes/0/indices/foo/31/index' exists and is a directory, but cannot be listed: list() returned null
        at org.elasticsearch.index.merge.scheduler.ConcurrentMergeSchedulerProvider$CustomConcurrentMergeScheduler.handleMergeException(ConcurrentMergeSchedulerProvider.java:133)
        at org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:518)

Apparently, the underlying cause for this exception is not having enough file handles, but there is nothing in the message to reflect this.

Is too few file handles the only cause of the exception, or are there others? This is an exception thrown by Java. Is it possible to catch this particular exception and return a better more explanatory message?

@clintongormley clintongormley added the :Core/Infra/Core Core issues without another label label Nov 21, 2015
@clintongormley
Copy link
Contributor Author

@mikemccand not sure if this is still an issue but if so, would it be possible to improve this exception or is the real reason (not enough file handles) just not available?

@mikemccand
Copy link
Contributor

@clintongormley I think in ES 2.0 this is already improved, because Lucene switched from Files.list in 4.10.x to Files.newDirectoryStream in 5.x, and the latter does a better job propagating errors from the OS up to Java, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label discuss >enhancement
Projects
None yet
Development

No branches or pull requests

2 participants