-
Notifications
You must be signed in to change notification settings - Fork 191
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
[BUG] UnexpectedJsonEventException reading task that failed #666
Comments
Without looking at the underlying implementation - which version of the client is this? I also see that you're using the OpenSearch client against ElasticSearch 7.10, please try OpenSearch 1.x and 2.x. If you can reproduce this against OpenSearch 2.x try implementing a YAML REST test? |
We are using version 2.6.0 of OpenSearch Java Client. |
We are experiencing the exact same thing. We are trying to get task with a task id. Most of the time it works but sometimes it fails with the exact same stack trace. We have not yet found the root cause of the issue but this report will help us where to look. |
And as @uriofferup mentioned the task that fails contains an array of json objects and not strings as it is defined in the
For completeness the exception stack trace
|
Looks like a task with this error can't be parsed. Try to turn this into a (failing) unit test? |
We started encountering this on the 2.8.0 client as well. It looks to be because the failures are trying to be deserialized as strings, but they contain an TaskFailure object. |
Thanks for the PR! Do you know whether this was a bug introduced in 2.8.0, or an unexpected server-side change? |
@dblock We just migrated from high level client and so far have only tested with 2.7.0 and 2.8.0 and the issue existed in both versions. I am not sure where the original bug was introduced. |
I found the issue using version 2.6.0 of OpenSearch Java Client. |
Thanks @Bfindlay for the PR. |
@dblock Yeah I will get to it sometime this week or next week. |
What is the bug?
Failed to serialize JSON response when reading a task that failed to execute.
How can one reproduce the bug?
Run any operation using
waitForCompletiong(false)
that fail to execute (for example due to versioning issue).Then read the taskId returned:
What is the expected behavior?
Deserialize the response into the GetTasksResponse object.
What is your host/environment?
AWS Lambda
ElasticSearch 7.10
Do you have any screenshots?
Executing /_tasks/
Gets this:
Error Obtained is:
Do you have any additional context?
Object
org.opensearch.client.opensearch.tasks.Status
has a field failures defined as aString[]
.The text was updated successfully, but these errors were encountered: