Return more detailed errors from ES storage #5209
Merged
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.
Which problem is this PR solving?
all shards fail
, which is pretty useless for the actual troubleshooting.RootCause
field.Description of the changes
How was this change tested?
Run all-in-one and
curl 'http://localhost:16686/api/services'
Before:
$ curl 'http://localhost:16686/api/services'
{"data":null,"total":0,"limit":0,"offset":0,"errors":[{"code":500,"msg":"search services failed: elastic: Error 400 (Bad Request): all shards failed [type=search_phase_execution_exception]"}]}
After:
$ curl 'http://localhost:16686/api/services'
{"data":null,"total":0,"limit":0,"offset":0,"errors":[{"code":500,"msg":"search services failed: elastic: Error 400 (Bad Request): all shards failed [type=search_phase_execution_exception]: RootCause[Fielddata is disabled on [serviceName] in [jaeger-service-]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [serviceName] in order to load field data by uninverting the inverted index. Note that this can use significant memory. [type=illegal_argument_exception]]"}]}