Open
Description
openedon Oct 5, 2024
Java API client version
8.14.3
Java version
11
Elasticsearch Version
8.15
Problem description
Logs:
co.elastic.clients.transport.TransportException: node: https://************:9200/, status: 200, [es/snapshot.restore] Failed to decode response
Java code which creates the snapshot:
RestoreRequest.Builder restoreRequestBuilder = new RestoreRequest.Builder();
restoreRequestBuilder.repository(repoName);
restoreRequestBuilder.snapshot(snapshot);
restoreRequestBuilder.indices(indices);
elasticsearchClient.snapshot().restore(restoreRequestBuilder.build());
The snapshot is successfully created on Elasticsearch, but the code fails to parse the response from the server, which simply returns:
{
"accepted": true
}
But the sdk requires a non-null snapshot:
private RestoreResponse(Builder builder) {
this.snapshot = (SnapshotRestore) ApiTypeHelper.requireNonNull(builder.snapshot, this, "snapshot");
}
Can someone help me with this please? Am i doing something wrong here?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment