-
Notifications
You must be signed in to change notification settings - Fork 689
Description
If a type was used and then fully-unsubscribed, the nonce needs to be preserved on the ads stream because the xds_protocol says:
The management server should not send a DiscoveryResponse for any DiscoveryRequest that has a stale nonce.
It appears grpc-node forgets the nonce here:
| this.typeStates.delete(type); |
It appears there's another bug, in that the nonce isn't per-ADS stream. That can cause re-creations of the ADS stream to never receive a response, because they are sending the wrong nonce. Either the nonce can be stored in per-ADS stream state, or can be cleared when creating a new ADS stream. The only place I see it set is here, so it doesn't seem to be cleared on new ADS stream:
| typeState.nonce = result.nonce; |
The xds_protocol says:
Note that the nonce is valid only in the context of an individual xDS stream; it does not survive stream restarts.
See also grpc/grpc-java#11796 and b/374697875