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
Clarify NameResolver.Listener behavior/expectations when the servers remain the same #6524
Comments
Also it would be nice to know (document/specify) whether setting new addresses/a new result on the listener will cause automatic connection attempts to those addresses or if they will only be used on demand. |
It's unspecified, so it is up to the particular loadbalancer's implementation. |
So can I interpret this as "avoid unnecessary calls to the |
The name resolver implementation should avoid unnecessary calls to |
If you could add that to the javadocs of the class/method that would be perfect. |
Maybe there should be a |
I noticed comments saying that implementations of |
IIRC the listener should be updated using the sync context. Which might indicate that it is not thread safe. |
As stated in Javadoc,
methods in |
Is your feature request related to a problem?
I have a (Spring) discovery service based
NameResolver
which sends regular updates/ticks to the application, however it does not contain details which service name might have changed. So I have to check them for updates frequently, even if only one is service updated.Should I verify whether the server addresses remained the same before invoking
onAddresses
/onResult
? How expensive is calling the method with the same servers over and over again? Does it trigger new connections to be made?Describe the solution you'd like
Javadocs that explain what the listener will/are supposed to do if they get (partially) the same addresses.
Either:
Or:
Additional context
Ref #1770
Related #6523
The text was updated successfully, but these errors were encountered: