-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Cleanup exceptions thrown during RollupSearch #41272
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
Cleanup exceptions thrown during RollupSearch #41272
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
|
Pinging @elastic/es-analytics-geo |
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
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 |
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- 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
…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)
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