-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add new classes for eliminating xds config tears #11740
base: master
Are you sure you want to change the base?
Conversation
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.
The shape looks fine.
package io.grpc.xds; | ||
|
||
public interface XdsClusterSubscriptionRegistry { | ||
ClusterSubscription subscribeToCluster(String clusterName); |
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 ClusterSubscription
is pretty useless. If we didn't have it, the caller could just pass clusterName
to releaseSubscription()
. ClusterSubscription
could be more useful if it avoided double-release, but it doesn't look like it's intended to.
I imagine we should either just pass clusterName
to release, or change subscribe to return a Closable and have it detect double-close.
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.
The proposal says that "The API will return some subscription handle". Mark seemed to be designing it so that multiple things could subscribe to the same cluster. I'm not sure that is really useful, but is what I was designing for.
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 is not currently a subscription handle. I'm fine with multiple things subscribing to the same cluster.
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.
What is the GRPC definition of a "subscription handle"? I assumed that it meant an object that had minimal functionality and acted as a representation of the particular subscription and whose only real use was passing to cancel.
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.
Changed to have subscribeToCluster
return a Closeable which is much cleaner.
32c80c0
to
f995211
Compare
These are unfinished, but would like to get the general shape agreed to before handling moving classes.