-
Notifications
You must be signed in to change notification settings - Fork 252
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
MissingRequiredPropertyException in a response ForcemergeRequest #931
Comments
Kibana request works fine: Response: |
One more comment, the workaround in the docs seems to fail as well... ` try {
ES8-ForcemergeRequest: ForcemergeRequest: POST /reviews-v4/_forcemerge?only_expunge_deletes=true&wait_for_completion=false |
Hello, thank for the report! This should be an issue we already solved, reported here and solved with this PR in the API specification repository. If I'm not mistaken the fix should be available from version of the client 8.15.3 onward, so 8.17.1 should definitely work. Could you check the client version again? |
Confirming that version 8.17.1 has the Line 62 in e5cbae4
|
FYI My bad, you are correct. VS Code maven was telling me 8.17.1 but it wasn't. I removed the dependency from the POM completely and put it back. It was running 8.15.2. Apologies, |
Java API client version
8.17.1
Java version
17
Elasticsearch Version
8.15.2
Problem description
Java client code:
` ForcemergeRequest.Builder reqBldr = new ForcemergeRequest.Builder()
.onlyExpungeDeletes(true)
.waitForCompletion(false)
.index(index);
Logging:
ES8-ForcemergeRequest: ForcemergeRequest: POST /reviews-v4/_forcemerge?only_expunge_deletes=true&wait_for_completion=false
******* exception during ForcemergeRequest: co.elastic.clients.transport.TransportException: node: https://gpi-ec-dev.es.vpce.us-east-1.aws.elastic-cloud.com/, status: 200, [es/indices.forcemerge] Failed to decode response
co.elastic.clients.transport.TransportException: node: https://gpi-ec-dev.es.vpce.us-east-1.aws.elastic-cloud.com/, status: 200, [es/indices.forcemerge] Failed to decode response
at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:404)
at co.elastic.clients.transport.ElasticsearchTransportBase.getApiResponse(ElasticsearchTransportBase.java:363)
at co.elastic.clients.transport.ElasticsearchTransportBase.performRequest(ElasticsearchTransportBase.java:147)
at co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient.forcemerge(ElasticsearchIndicesClient.java:937)
at com.gartner.peerinsights.lambda.es.service.ElasticServiceES8.expungeDeletedDocs(ElasticServiceES8.java:143)
at com.gartner.peerinsights.lambda.es.service.ElasticServiceES8.deleteStaleData(ElasticServiceES8.java:82)
at com.gartner.peerinsights.lambda.es.job.Main.handleRequest(Main.java:50)
at com.gartner.peerinsights.lambda.es.job.Main.main(Main.java:11)
Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ForcemergeResponse.shards'
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch._types.ShardsOperationResponseBase.(ShardsOperationResponseBase.java:68)
at co.elastic.clients.elasticsearch.indices.forcemerge.ForceMergeResponseBody.(ForceMergeResponseBody.java:66)
at co.elastic.clients.elasticsearch.indices.ForcemergeResponse.(ForcemergeResponse.java:59)
at co.elastic.clients.elasticsearch.indices.ForcemergeResponse.(ForcemergeResponse.java:55)
at co.elastic.clients.elasticsearch.indices.ForcemergeResponse$Builder.build(ForcemergeResponse.java:90)
at co.elastic.clients.elasticsearch.indices.ForcemergeResponse$Builder.build(ForcemergeResponse.java:73)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:399)
... 7 more
Lambda for ES8 stale data executed successfully.
The text was updated successfully, but these errors were encountered: