Skip to content

Fix deserialization regression when parsing failed_shards from a search result - #1889

Closed
janhoy wants to merge 3 commits into
opensearch-project:3.xfrom
janhoy:backport-shardfailure-primary-fix-3x
Closed

Fix deserialization regression when parsing failed_shards from a search result#1889
janhoy wants to merge 3 commits into
opensearch-project:3.xfrom
janhoy:backport-shardfailure-primary-fix-3x

Conversation

@janhoy

@janhoy janhoy commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Description

This is a surgical back port of the intent from opensearch-project/opensearch-api-specification#1040 but intended for 3.x line of java client. It targets branch 3.x only, and patches OpenAPI spec with only one line to rectify the regression caused when making primary a required field.

The reason I did not attempt this over at opensearch-api-specification repo is that that repo seems to not have a multi-version release scheme set up, everything is put into main branch and it is unclear what version of the spec is currently used in java-client 3.6 and how to patch only that version.

Issues Resolved

Fixes #1877

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ch result

Signed-off-by: Jan Høydahl <jan.git@cominvent.com>
Signed-off-by: Jan Høydahl <jan.git@cominvent.com>
Signed-off-by: Jan Høydahl <jan.git@cominvent.com>
@reta

reta commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

@janhoy we've just merged #1894 , could you share how disruptive the change is for you case? (if you could builds against 3.17.0-SNAPSHOT) Thank you.

@janhoy

janhoy commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @reta. We downgraded to opensearch-java 3.4.0 as a workaround. Will be able to test your fix when opensearch-java 3.7.0 is released. I can probably live with potentially needing to change our application code to reference the new generated model-class if needed. Feels like a niche use case, most client users probably do not actively use the old model class anyway. Will now close this.

@janhoy janhoy closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants