Issue with opensearch client

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch 2.14.0
opensearch-java 2.14.0 (but I’ve tried several versions, was 2.11.1 at first)
opensearch-rest-client 2.16.0 (but I’ve tried several versions, was 2.8.3 at first)

Describe the issue:
Hello,
A while back, I’ve created a topic on this forum regarding a particular issue:

To sum it up here, I have an application that will basically reindex data from one mapping to another one. To check that my reindexation occured properly, I want to use the tasks API to be able to check that the reindexation of one index succeeded, before moving on to the next one.
To do so, I use the response from my previous post (retrieving the tasksId, and then using it to retrieve the next one, I just use GetTasksRequest and GetTasksResponse) and it used to work perfectly:
GetTasksRequest getTasksRequest = new GetTasksRequest.Builder().taskId(migrationIndex.getTaskId()).build();
GetTasksResponse getTasksResponse = elasticsearchConnector.client.tasks().get(getTasksRequest);
return getTasksResponse.completed();

I hadn’t started the project in a few months, and a few days ago, I restarted it and noticed that this specific request now fails everytime a task is completed (but when the task is still ongoing, it seems to be working just fine), almost as if the tasks API responds a message that’s not compatible with the java client.
I’ll put the error message in the screenshots part.

A few precisions:

  • When I request in the devtool of opensearch dashboard I retrieve the task properly.
  • In my test containers, it works fine too

So if someone knows why this now doesn’t work anymore it would help a lot, thanks for any clue you might give me

Relevant Logs or Screenshots:

@gabinvallet please check [BUG] UnexpectedJsonEventException reading task that failed · Issue #666 · opensearch-project/opensearch-java · GitHub

Thanks for your answer Reta, if I understand correctly it means that this issue is stuck for now right ?

Probably better to say, not fixed but help is very welcome.

Okay thanks for your answer, I’ll check more into details if I have some time :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.