Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

grpc-js-xds: Preserve resource type version and nonce when unsubscribing #2879

Conversation

murgatroid99
Copy link
Member

This fixes #2875 by never deleting typeStates entries in AdsCallState once they are created. As a result, the nonce will persist for the duration of the ADS stream. In addition, handling nonces for unknown types is not an issue because a type stays known for the duration of the stream after it is requested once, and we do not guarantee handling of the case where a control plane sends a resource type that was never requested.

The only functional impact that I can see of this change is that it will send a DiscoveryRequest with an empty resource_names list after unsubscribing from the last resource of a particular type, and I believe that is the correct behavior.

This should not meaningfully impact resource usage, because a type state with no resources is just two strings and an empty map, and there are at most 4 for a given stream, and the lifetime is limited to the lifetime of the stream.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xds: Preserve nonce for unsubscribing type on ADS stream
1 participant