envoyproxy / xds-relay

Caching, aggregation, and relaying for xDS compliant clients and origin servers
Apache License 2.0
132 stars 29 forks source link

upstream client: Handle recv() blocked scenarios #223

Closed jessicayuen closed 3 years ago

jessicayuen commented 3 years ago

There are two error scenarios currently that leads to cache drifts between the management server and xds-relay.

  1. There is a bug where the stream is stuck indefinitely if the send chan is closed unexpectedly. The recv routine stays open and the waitgroup never completes, blocking retries.

  2. If the response receiver channel for recv() is blocked, the upstream client is blocked from sending ACKs back to the management server.

Signed-off-by: Jess Yuen jyuen@lyft.com