Skip to content

xds: reset ApiState during stream termination#10827

Closed
venilnoronha wants to merge 5 commits intoenvoyproxy:masterfrom
venilnoronha:fix-xds
Closed

xds: reset ApiState during stream termination#10827
venilnoronha wants to merge 5 commits intoenvoyproxy:masterfrom
venilnoronha:fix-xds

Conversation

@venilnoronha
Copy link
Member

@venilnoronha venilnoronha commented Apr 17, 2020

Description:
Currently, when a stream is terminated, an ApiState that's in the paused state can remain there indefinitely. This is because resume is never called for that type_url. If the stream is reestablished, sendDiscoveryRequest will set that ApiState as pending and no DiscoveryRequests are ever sent out for that type.

The fix here is to explicitly reset the ApiState for such types during onEstablishmentFailure so that sendDiscoveryRequest can correctly start sending requests for that type again once the stream is reestablished.

Risk Level: High
Testing: Added test
Docs Changes: N/A
Release Notes: N/A

Currently, when a stream is terminated, an `ApiState` that's in the
paused state can remain there indefinitely. This is because `resume` is
never called for that `type_url`. If the stream is reestablished,
`sendDiscoveryRequest` will set that `ApiState` as pending and no
`DiscoveryRequest`s are ever sent out for that type.

The fix here is to explicitly reset the `ApiState` for such types during
`onEstablishmentFailure` so that `sendDiscoveryRequest` can correctly
start sending requests for that type again once the stream is
reestablished.

Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
@venilnoronha
Copy link
Member Author

The fix was incorrect. PR #10728 resolves the real issue.

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.

2 participants