[es/snapshot.restore] Missing required property 'RestoreResponse.snapshot' with wait_for_completion=false
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java, typescript
- Domain
- api, backend-api-design
Research direction
Start with the snapshot restore response definition at the linked SnapshotRestoreResponse.ts line and compare it with the server response shown here. Review the similar specification PR, then trace the generated RestoreResponse and CreateSnapshotResponse classes; done means asynchronous restore and snapshot creation responses deserialize without requiring an absent snapshot property.
Written by the indexing model from the issue text.
Description
Java API client version
7.16.2 and 7.17.1
Java version
java 11.0.14 2022-01-18 LTS
Elasticsearch Version
7.16.2
Problem description
Running snapshot restore with wait_for_completion=false does not work with the Java client.
Call:
client
.snapshot()
.restore(r -> r
.repository(snapshotRepositoryName)
.snapshot(snapshotName)
.indices(globPatterns)
.renamePattern(renamePattern.getSearchRegex())
.renameReplacement(renamePattern.getReplacementRegex())
.includeAliases(false)
.waitForCompletion(false)
Results in URI:
/_snapshot/myRepoName/cloud-snapshot-2022.02.23-asdf/_restore?wait_for_completion=false
Error:
co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'RestoreResponse.snapshot'
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:57)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:50)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:121)
at co.elastic.clients.elasticsearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:94)
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.rest_client.RestClientTransport.decodeResponse(RestClientTransport.java:325)
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:291)
at co.elastic.clients.transport.rest_client.RestClientTransport.performRequest(RestClientTransport.java:144)
at co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient.restore(ElasticsearchSnapshotClient.java:361)
at co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient.restore(ElasticsearchSnapshotClient.java:377)
The same problem also happens with es/snapshot.restore:
co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'CreateSnapshotResponse.snapshot'
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch.snapshot.CreateSnapshotResponse.<init>(CreateSnapshotResponse.java:61)
at co.elastic.clients.elasticsearch.snapshot.CreateSnapshotResponse.<init>(CreateSnapshotResponse.java:50)
Notes
From what I understand, the server responds with {"acknowledged":true} but in the spec the "snapshot" is mandatory.
https://github.com/elastic/elasticsearch-specification/blob/d19af7a3ccd53459593246fbc2fffe0c33d86712/specification/snapshot/restore/SnapshotRestoreResponse.ts#L24
See similar PR: https://github.com/elastic/elasticsearch-specification/pull/1326/files
- Dominant language
- Java
- Stars
- 524
- Forks
- 299
- Avg merge
- 16m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elastic/elasticsearch-java
-
Delete By Query deserialization will not account for search failuresPossibly taken @l-trotta claimed this 6 days ago. Open
elastic/elasticsearch-java#1349 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Nested index settings that do not end up deserialized in otherSettings leads to requiring properties on parent JSON nodesPossibly taken @l-trotta claimed this 6 days ago. OpenArea: Specification Category: Bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
elastic/elasticsearch-java#1347 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
RestClientTransport sends bulk bodies as one HTTP chunk / TLS record / syscall per NDJSON buffer, burning ~45x the reactor CPU of the HLRCPossibly taken @l-trotta claimed this 22 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
elastic/elasticsearch-java#1339 · 5 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
elastic/elasticsearch-java#1212 · 8 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
elastic/elasticsearch-java#1165 · 5 comments ·
Maintainers usually reply within 1 day
All issues in elastic/elasticsearch-java
Similar issues
-
backend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bcgov/nr-forest-client#2524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Sinytra/ForgifiedFabricAPI#298 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
team:Lumberjack
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OpenLiberty/open-liberty#35998 ·
Maintainers usually reply within 1 day