opensearch-project / opensearch-project/OpenSearch

[BUG] Forward compatibility for BulkResponse Class

Open
#3,908 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug distributed framework
Dominant language
Java
Stars
13.7k
Forks
3k
Avg merge
2d 23h
Merged PRs (30d)
108

Description

Describe the bug
Today, BulkResponse in Opensearch throws an exception in case it is not able to recognize a property. This makes the client to not be forward compatible to any new fields which a new version of server can add, and prevents the API from evolving without breaking the client.

CP: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/action/bulk/BulkResponse.java#L203

Is this the intended behavior? If not, we should ignore unknown attributes if any instead of throwing the exception.

Expected behavior
Ignore unknown attributes

Plugins
NA

Screenshots
NA

Host/Environment (please complete the following information):

  • OS: macOS
  • Version 12.4 (Opensearch 1.2)

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked BulkResponse.java location in the OpenSearch repository and inspect how unrecognized properties are handled. Confirm the current exception path and determine how unknown attributes should be ignored; done means BulkResponse accepts new fields without throwing while preserving handling of known attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.