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

grpc-js-xds: Fix RDS and EDS missing resource handling #1925

Conversation

murgatroid99
Copy link
Member

@murgatroid99 murgatroid99 commented Oct 5, 2021

This changes ADS response handling to conform to this section of the Envoy docs. The LDS (Listener) and CDS (Cluster) responses are state-of-the-world, so any resources omitted from any response are considered to be removed. But RDS (Route) and EDS (Endpoint) responses are incremental, so omission of resources does not imply anything about those resources. So, RDS and EDS resources should only be considered to be removed when they are not pointed to by any LDS or CDS resources, respectively. Since we know that we see every LDS and CDS resource in the corresponding responses, we can simply aggregate all of the RDS and EDS names pointed to by those resources in a single response, and consider all others to be removed.

The important changes here are the RDS and EDS changes, to avoid incorrectly marking those resources as removed.

There are no CDS changes in this PR because the CDS handling code already had the correct behavior, similar to what I added in the LDS handling code: https://github.com/grpc/grpc-node/blob/%40grpc/grpc-js%401.4.x/packages/grpc-js-xds/src/xds-stream-state/cds-state.ts#L148-L163

@murgatroid99 murgatroid99 merged commit e5a13a5 into grpc:@grpc/grpc-js@1.4.x Oct 6, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants