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

[Backport 2.x] Add support for API versioning and fail open in weighted shard routing #5781

Merged
merged 6 commits into from
Jan 10, 2023

Conversation

anshu1106
Copy link
Contributor

@anshu1106 anshu1106 commented Jan 10, 2023

Description

Backport PR for weighted routing changes

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

… weights in the response (opensearch-project#5680)

* Add support for discovered master and remove local weights in the weighted routing API response

Signed-off-by: Anshu Agarwal <[email protected]>
* Support API versioning for weighted shard routing

Signed-off-by: Anshu Agarwal <[email protected]>
…pensearch-project#5072)

* Fail open requests on search shard failures (

Signed-off-by: Anshu Agarwal <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

[Weighted Shard Routing] Refactor and fix singleton in FailAwareWeightedRouting

Signed-off-by: Anshu Agarwal <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Comment on lines +53 to +57
version = in.readLong();
if (in.available() != 0) {
awarenessAttribute = in.readString();
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a check to read these params only if OpenSearch version is 2.5 and above else there is a possibility that mixed version cluster tests will fail with serde issues. We might want to do the same in main as well.

Copy link
Contributor Author

@anshu1106 anshu1106 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the apis are marked experimental, do you think we should put effort on this. The change will require effort and testing to make both the flows work.

Even if we just fix the serialization/deserialization the request will fail eventually due to version mismatch. There is a non trivial problem to address version update in cluster metadata since few nodes(2.5 and above) may support versioning and others won't. So if we need to support mixed clusters, we have to build backward compatibility ie enable/disable versioning support for the entire cluster

As per OpenSearch doc, we can break experimental apis
#5255 (comment)

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@anshu1106
Copy link
Contributor Author

Gradle Check (Jenkins) Run Completed with:

Build failed due to flaky test failure - #5765

@Bukhtawar Bukhtawar merged commit 4813208 into opensearch-project:2.x Jan 10, 2023
@Bukhtawar
Copy link
Collaborator

Test Failure : #5765

kotwanikunal pushed a commit that referenced this pull request Jan 25, 2023
…ed shard routing (#5781)

* [Backport 2.x] 
[Weighted Shard Routing] Add support for discovered master and remove local weights in the response #5680
[Weighted Shard Routing] API versioning #5255
[Weighted Shard Routing] Fail open requests on search shard failures #5072
[Weighted Shard Routing] Refactor and fix singleton in FailAwareWeightedRouting #5778

Signed-off-by: Anshu Agarwal <[email protected]>
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.

3 participants