Skip to content

lose watch when SimpleCache respond return false in respondWithSpecificOrder #219

Open

Description

@firebook

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;

`

Activity

  1. staticfinalzero commented on May 17, 2024

    @staticfinalzero

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions