Skip to content

xdsclient: propagate previously received errors to new watchers #7819

@easwars

Description

@easwars

Currently when an authority is notified about events on a watched resource, the following happens:

  • when a good update is received, the resource cache is updated and existing watchers are notified about the update
    • if a new watch is registered for this resource in the future, it will immediately get the most recent update
  • when a bad update is received (i.e. one that is NACKed), the metadata field in the resource cache is updated with the error, and all existing watchers are notified about the error. The resource cache persists the old good resource (if one exists)
    • if a new watch is registered for this resource in the future, it will immediately get the most recent update (if one exists)
    • but it never gets the cached error
  • when a resource not found error is received, the resource cache is cleared of the previous resource (if one exists), and the metadata field is updated to indicate that the management server does not have this resource. All existing watchers are notified that the resource does not exist on the management server.
    • if a new watch is registered for this resource in the future, it will simply hang

We need to fix the code to handle the NACK and resource-not-found case for new watchers, and add appropriate tests for these scenarios.

Metadata

Metadata

Assignees

Labels

Area: xDSIncludes everything xDS related, including LB policies used with xDS.Type: Bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions