Open firebook opened 2 years ago
We've also encountered this issue when using gRPC with xDS. If we try to send a gRPC request through to xds:///abc
before the SimpleCache
has that resource available, subsequent calls to SimpleCache.setSnapshot()
will remove the watch preventing gRPC from being notified of later updates to the abc
resource.
Per the Envoy specs at https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#knowing-when-a-requested-resource-does-not-exist, this should be considered a bug:
Note that even if a requested resource does not exist at the moment when the client requests it, that resource could be created at any time. Management servers must remember the set of resources being requested by the client, and if one of those resources springs into existence later, the server must send an update to the client informing it of the new resource.
I've submitted a pull request here: https://github.com/envoyproxy/java-control-plane/pull/373
For ADS mode, class io.envoyproxy.controlplane.cache.SimpleCache will respond to client when setSnapshot.
When respond(watch, snapshot, group); return false, respondWithSpecificOrder will lose the watch, since respond is not complete, client will not rewatch
` respond(watch, snapshot, group);
`