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

Java client exception thrown only when all shards fail. #21345

Closed
BigBrain-Industries opened this issue Nov 4, 2016 · 5 comments
Closed

Java client exception thrown only when all shards fail. #21345

BigBrain-Industries opened this issue Nov 4, 2016 · 5 comments

Comments

@BigBrain-Industries
Copy link

Elasticsearch version:1.4.4

Plugins installed: [head]

JVM version:1.8

OS version:rhel 6

Description of the problem including expected versus actual behavior: the java client throws a EsRejectedExecutionException only when all shards fail. When some shards fail, no exception is thrown.

Steps to reproduce:
1.Run parallel arbitrary queries with the java client until the server cannot handle anymore.
2.Only some of the queries will fail, throwing EsRejectedExecutionException. If only some shards fail, the exception isn't thrown.

@clintongormley
Copy link
Contributor

Sorry @TheGreatYamcha but 1.4.4 is way too old. Please upgrade and open a new issue if you can replicate this on 5.0

@BigBrain-Industries
Copy link
Author

I can test it on a newer version, but as you know (#18978), elasticsearch returns 200 when some shards fail and SearchResponse.status() also returns RestStatus.OK even when a shard fails. This is apparently the intended behavior.
I want to make sure that not throwing an exception when a shard fails is not the intended behavior and is indeed a bug.

@clintongormley
Copy link
Contributor

Not throwing an exception in search when some (not all) shards fail is considered a feature, not a bug as we return you what information we can (perhaps while shards are recovering). You can check the _shards response for more info about how many shards succeeded or failed.

@BigBrain-Industries
Copy link
Author

@clintongormley then why did you tell me to try this on a newer version of Elasticsearch?

@clintongormley
Copy link
Contributor

Because I misread your original issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants