Skip to content

Conversation

@polyfractal
Copy link
Contributor

  • msearch exceptions should be thrown directly instead of wrapping in a RuntimeException

  • When processing responses, if we find that all indices were missing we should throw a ResourceNotFound exception instead of RuntimeException. 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. This ResourceNotFound exception 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

- 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
@polyfractal polyfractal added >bug :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v8.0.0 v7.2.0 labels Apr 16, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

Copy link
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 some questions and comments

@polyfractal
Copy link
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 IndexNotFound), but thought the extra error message context might be appreciated with minimal maintenance burden. Especially since this differs a bit from normal search which will happily tolerate a missing index.

Copy link
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.

LGTM

@polyfractal polyfractal merged commit 2151ecb into elastic:master May 8, 2019
polyfractal added 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
)

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v7.2.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rollup search: wrong error response

4 participants