You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lose watch when SimpleCache respond return false in respondWithSpecificOrder #219
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);
// Discard the watch. A new watch will be created for future snapshots once envoy ACKs the response.
return true;
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.
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.
Activity
bug fix to requested resource does not exist handling
cache: bug fix to requested resource does not exist handling
staticfinalzero commentedon May 17, 2024
We've also encountered this issue when using gRPC with xDS. If we try to send a gRPC request through to
xds:///abcbefore theSimpleCachehas that resource available, subsequent calls toSimpleCache.setSnapshot()will remove the watch preventing gRPC from being notified of later updates to theabcresource.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:
I've submitted a pull request here: #373
cache: bug fix to requested resource does not exist handling