Skip to content
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] Java Client SDK RestoreIndex is throwing Missing required property 'RestoreResponse.snapshot' #930

Open
shasti421 opened this issue Apr 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@shasti421
Copy link

Attached code is throwing error with AWS OpenSearch, but index is getting restored as expected.

 			RestoreRequest.Builder builder = new RestoreRequest.Builder();
			builder.repository(repoName);
			builder.snapshot(snapshotName);
			builder.indices(Arrays.asList(settings.get("indices").split(",")));
			builder.partial(false);
			return openSearchClient.snapshot().restore(builder.build());
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'RestoreResponse.snapshot'
	at org.opensearch.client.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:89)
	at org.opensearch.client.opensearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:58)
	at org.opensearch.client.opensearch.snapshot.RestoreResponse.<init>(RestoreResponse.java:51)
	at org.opensearch.client.opensearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:122)
	at org.opensearch.client.opensearch.snapshot.RestoreResponse$Builder.build(RestoreResponse.java:95)
	at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:92)
	at org.opensearch.client.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:55)

Do you have any screenshots?

See attached stack trace above

Do you have any additional context?

Using client version 2.9.1

@shasti421 shasti421 added bug Something isn't working untriaged labels Apr 9, 2024
@shasti421
Copy link
Author

Similar error happening with

                       CreateSnapshotRequest.Builder builder = new CreateSnapshotRequest.Builder();
			builder.repository(repoName);
			builder.snapshot(snapshotName);
			return openSearchClient.snapshot().create(builder.build());
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'CreateSnapshotResponse.snapshot'
at org.opensearch.client.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:89)
at org.opensearch.client.opensearch.snapshot.CreateSnapshotResponse.<init>(CreateSnapshotResponse.java:62)

@dblock dblock removed the untriaged label Apr 16, 2024
@dblock
Copy link
Member

dblock commented Apr 16, 2024

@shasti421 Is this specific to AWS, or does this happen with vanilla OpenSearch? Also can you reproduce this with curl or is it a client problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants