-
Notifications
You must be signed in to change notification settings - Fork 705
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
feat(lb): deterministic subsetting algorithm #1289
Conversation
Hello @OlgaMaciaszek , PTAL |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jizhuozhi, thanks for submitting the PR. I have done an initial review after looking at the class structure. I have added some comments - please address. Also, please add documentation. I will take a look at the actual algorithm implementation and tests tomorrow and provide a second review then.
...main/java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplier.java
Outdated
Show resolved
Hide resolved
...main/java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplier.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added some comments. Please address. Please also add corresponding ServiceInstanceListSupplierBuilder
methods and configurations
property-based instantiation in LoadBalancerClientConfiguration
.
...main/java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplier.java
Show resolved
Hide resolved
...main/java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplier.java
Show resolved
Hide resolved
.../java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplierTest.java
Show resolved
Hide resolved
.../java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplierTest.java
Outdated
Show resolved
Hide resolved
.../java/org/springframework/cloud/loadbalancer/core/SubsetServiceInstanceListSupplierTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added some comments - please address them.
...mons/src/main/java/org/springframework/cloud/client/loadbalancer/LoadBalancerProperties.java
Outdated
Show resolved
Hide resolved
...mons/src/main/java/org/springframework/cloud/client/loadbalancer/LoadBalancerProperties.java
Show resolved
Hide resolved
super(delegate); | ||
LoadBalancerProperties properties = factory.getProperties(getServiceId()); | ||
String instanceId = properties.getSubset().getInstanceId(); | ||
if (StringUtils.hasText(instanceId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document this entire logic.
...ain/java/org/springframework/cloud/loadbalancer/core/ServiceInstanceListSupplierBuilder.java
Show resolved
Hide resolved
Hi @jizhuozhi, will you be able to finish this PR up soon? I'd like to get this feature included in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added a comment. Please address.
.../java/org/springframework/cloud/loadbalancer/annotation/LoadBalancerClientConfiguration.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jizhuozhi, now only documentation, including this: #1289 (comment), is left. Please add corresponding changes in docs/modules/ROOT/pages/spring-cloud-commons/loadbalancer.adoc
.
Hello, @OlgaMaciaszek . The document has been updated, PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on it, @jizhuozhi. LGTM.
Hi @Buzzardo, could you please review documentation changes? |
Fixes gh-1288. |
gh-1288