Skip to content

delta-xDS doesn't update the known resource version for wildcard resources #20699

@adisuissa

Description

@adisuissa

Title: delta-xDS doesn't update the known resource version for wildcard resources

Description:
The current implementation of the delta-xDS for wildcard responses only stores the initial version for a resource name that Envoy observes, instead of the version of the latest update.
See here:

wildcard_resource_state_.insert({resource.name(), resource.version()});

and here:

ambiguous_resource_state_.insert({it->first, it->second.version()});

This can lead to using a stale resource without the server knowing about it.
For example:

  1. Envoy receives resource_A v1 from server (updates the map to v1).
  2. Envoy receives resource_A v2 from server (doesn't update the map, because it already has a resource with the same name).
  3. Envoy reconnects to a new server (that only knows about v1), and publishes it has v1, although the actual resource is of v2. -> The server won't send Envoy an update until that resource is updated on the server.

Using insert_or_assign should solve the issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions