Skip to content
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

lose watch when SimpleCache respond return false in respondWithSpecificOrder #219

Open
firebook opened this issue Apr 14, 2022 · 1 comment

Comments

@firebook
Copy link

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;

`

staticfinalzero added a commit to staticfinalzero/java-control-plane that referenced this issue May 17, 2024
bug fix to requested resource does not exist handling. we need to keep watch active for when resource is finally created so we can notify client.

envoyproxy#219
staticfinalzero added a commit to staticfinalzero/java-control-plane that referenced this issue May 17, 2024
we need to keep watch active for when resource is finally created so we can notify client.

envoyproxy#219
@staticfinalzero
Copy link

staticfinalzero commented 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:///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: #373

staticfinalzero added a commit to staticfinalzero/java-control-plane that referenced this issue Jun 26, 2024
we need to keep watch active for when resource is finally created so we can notify client.

envoyproxy#219
Signed-off-by: staticfinalzero <170128502+staticfinalzero@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants