Cleanup exceptions thrown during RollupSearch#41272
Merged
polyfractal merged 3 commits intoelastic:masterfrom May 8, 2019
Merged
Cleanup exceptions thrown during RollupSearch#41272polyfractal merged 3 commits intoelastic:masterfrom
polyfractal merged 3 commits intoelastic:masterfrom
Conversation
- msearch exceptions should be thrown directly instead of wrapping in a RuntimeException - When processing, if we find that all indices were missing we should throw a ResourceNotFound exception instead of RuntimeException
Collaborator
|
Pinging @elastic/es-analytics-geo |
jimczi
reviewed
Apr 16, 2019
Contributor
jimczi
left a comment
There was a problem hiding this comment.
I left some questions and comments
x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/RollupResponseTranslator.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/rollup/src/main/java/org/elasticsearch/xpack/rollup/RollupResponseTranslator.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Review comments addressed. If there is a missing index we wrap it with a ResourceNotFound exception and provide a friendlier message. I considered just throwing all exceptions as-is (including |
polyfractal
pushed a commit
that referenced
this pull request
May 8, 2019
- msearch exceptions should be thrown directly instead of wrapping in a RuntimeException - Do not allow partial results (where some indices are missing), instead throw an exception if any index is missing
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
May 9, 2019
…rsing * elastic/master: [ML] relax set upgrade mode test to match what is guaranteed (elastic#41958) Add note about ILM action ordering (elastic#41771) Remove Version 6 pre-release constants (elastic#41517) Mute illegal interval rollup tests Add static section whitelist info to api docs generation (elastic#41870) Cleanup RollupSearch exceptions, disallow partial results (elastic#41272)
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
msearch exceptions should be thrown directly instead of wrapping in a
RuntimeExceptionWhen processing responses, if we find that all indices were missing we should throw a
ResourceNotFoundexception instead ofRuntimeException. Note: we check for indices before executing the request (via local cluster state), so a more friendly message is provided to the user if possible. ThisResourceNotFoundexception is only thrown if the indices are deleted while the search request is in-flight.Also some misc cleanup and refactoring. Still a lot of if/else spaghetti alas :(
Closes #38015