-
Notifications
You must be signed in to change notification settings - Fork 4k
api: delete deprecated NameResolver APIs #7936
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
Conversation
ejona86
left a comment
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 looks fine, but I will have some questions about this unique id you are referring to and question if we'll make it required.
Background about the need of propagate channel id to resolver: #7922 (comment) |
This is for one kind of affinity. We want RPCs sent through the same Channel have the same hash value. C-core is just using the memory address of the Channel. Whether it should be required or optional in |
I think c-core reuses the underlying channel for the same address. |
Why not just have the NameResolver choose a random value? Yes, it would be lost if the channel goes into IDLE mode, but I don't see how that's a problem in the slightest. |
The client needs some kind of affinity - What I'm concerning is if there's a long client session that the channel goes into IDLE and reactivated. |
Idle mode takes 30 minutes to enter by default. I think it is safe to say any affinity is either lost or not worth much trying to preserve at that point, as the affinity in to reduce latency and there will be plenty of latency bringing the channel back online again. So even if someone chose to change the idleness to 5 minutes or 1 minute, I don't think I see much of a problem. |
|
I commented on C-core's PR (as they are also just using the resolver's address in the draft) and got a similar answer. Yeah, I agree affinity may not worth much for RPCs after a period in the order of minutes. We can still merge this PR, as it's irrelevant. So I would not need to plumb a unique ID for Channel to the resolver. |
|
Merging this PR SGTM. The APIs were deprecated two years ago, which is plenty of time to migrate. |
I am trying to add a new API for exposing some unique ID that represents the Channel to its resolver. It could just be
ManagedChannelImpl's logId (thelongvalue).We want this to be a required attribute for
NameResolver.Argsto avoid confusion. So deleting old APIs (NameResolver.Helper) without the necessity to add such an attribute for it as well.