-
Notifications
You must be signed in to change notification settings - Fork 3.9k
api: Javadoc changes for io.grpc.LoadBalancer method signatures #11623
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
base: master
Are you sure you want to change the base?
Conversation
…h Duration" This reverts commit ab97045.
Below points have been addressed: javadoc for public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses)
javadoc for public Status acceptResolvedAddresses(ResolvedAddresses resolvedAddresses)
|
@@ -179,12 +179,12 @@ public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses) { | |||
* EquivalentAddressGroup} addresses should be considered equivalent but may be flattened into a | |||
* single list if needed. | |||
* | |||
* <p>Implementations can choose to reject the given addresses by returning {@code false}. | |||
* <p>Implementations can choose to reject the given addresses by returning {@code UNAVAILABLE}. |
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.
Replace with {@code Status.UNAVAILABLE} . Also below.
…d and related changes
@@ -191,6 +192,7 @@ private List<ChildLbState> updateChildrenWithResolvedAddresses( | |||
} | |||
newChildLbStates.add(childLbState); | |||
if (entry.getValue() != null) { | |||
//TODO - https://github.com/grpc/grpc-java/issues/11194 | |||
childLbState.lb.handleResolvedAddresses(entry.getValue()); // update child LB |
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.
#11894 swapped this to acceptResolvedAddresses()
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.
Merged with master branch latest changes
# Conflicts: # util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java
# Conflicts: # services/src/main/java/io/grpc/protobuf/services/HealthCheckingLoadBalancerFactory.java
@@ -145,6 +145,7 @@ public void tearDown() { | |||
assertThat(fakeClock.getPendingTasks()).isEmpty(); | |||
} | |||
|
|||
@Deprecated |
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.
Revert these changes? The tests were converted to acceptResolvedAddresses.
@@ -107,6 +107,7 @@ public void setUp() { | |||
loadBalancer = new WrrLocalityLoadBalancer(mockHelper, lbRegistry); | |||
} | |||
|
|||
@Deprecated |
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.
Revert these changes? The tests were converted to acceptResolvedAddresses.
* @deprecated As of release 1.69.0, | ||
* use instead {@link #acceptResolvedAddresses(ResolvedAddresses)} | ||
*/ | ||
@Deprecated |
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.
This method is not deprecated, and should not be marked deprecated.
@@ -30,8 +30,8 @@ public abstract class ForwardingLoadBalancer extends LoadBalancer { | |||
protected abstract LoadBalancer delegate(); | |||
|
|||
@Override | |||
public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses) { |
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.
Revert this method's implementation back to forwarding to handleResolvedAddresses()
. Everything (in our code base) extending this class has both methods implemented. You can then remove the SuppressWarnings.
@@ -179,6 +179,7 @@ public void tearDown() { | |||
} | |||
} | |||
|
|||
@Deprecated |
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.
We want to fix these. I've sent out #12053
@@ -45,6 +45,8 @@ public void allMethodsForwarded() throws Exception { | |||
mockDelegate, | |||
new TestBalancer(), | |||
Arrays.asList( | |||
LoadBalancer.class.getMethod("acceptResolvedAddresses", ResolvedAddresses.class))); | |||
LoadBalancer.class.getMethod("acceptResolvedAddresses", ResolvedAddresses.class), |
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.
acceptResolvedAddresses should be removed already with the current code. After you change handleResolverAddresses to forward, it should be removed as well.
Javadoc changes for io.grpc.LoadBalancer
Fixes #11194