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

[Weighted Routing] Weighted routing metadata to support multiple awareness attributes #5580

Conversation

anshu1106
Copy link
Contributor

@anshu1106 anshu1106 commented Dec 15, 2022

Signed-off-by: Anshu Agarwal anshukag@amazon.com

Description

Currently as part of delete weighted routing api call, weighted routing metadata is cleared off completely from the cluster state without matching the awareness attribute. If weights are set for multiple awareness attributes, then this is not desirable.

This PR adds support for updating weights for multiple awareness attribute and delete specific awareness attribute weights.

Issues Resolved

#4747

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.

Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Anshu Agarwal added 2 commits December 16, 2022 15:20
Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Anshu Agarwal added 2 commits December 19, 2022 10:40
Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
Signed-off-by: Anshu Agarwal <anshukag@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@@ -35,7 +35,7 @@ public class RestClusterDeleteWeightedRoutingAction extends BaseRestHandler {

@Override
public List<Route> routes() {
return singletonList(new Route(DELETE, "/_cluster/routing/awareness/weights"));
return singletonList(new Route(DELETE, "/_cluster/routing/awareness/{attribute}/weights"));
Copy link
Member

Choose a reason for hiding this comment

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

This change is backward incompatible since we have already released the above API in 2.3? Either we keep both or just the first one?

Copy link
Contributor Author

@anshu1106 anshu1106 Dec 19, 2022

Choose a reason for hiding this comment

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

This api is marked as experimental in 2.4, so I guess we can have breaking changes

@anshu1106 anshu1106 closed this Jan 9, 2023
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