Open fscnick opened 2 years ago
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
no stalebot
The current behavior of Linear Cache is:
I plan on addressing it, but I first need to do some lower level changes (example passing the state of subscription to the watch) as other issues are currently present in the system even before creating the response (e.g. when adding a new resource in a watch without a version change in sotw in linear cache)
This issue has been fixed in this PR in our fork. We are currently validating the behavior with our internal usage of gRPC and envoy as xDS clients, and will upstream it when possible
UpdateResource and DeleteResource will call notifyAll once it has changes. And It respond the resource that has been changed. https://github.com/envoyproxy/go-control-plane/blob/4455b6323de455adf8d0c8afeb3fa5a90652555c/pkg/cache/v3/linear.go#L140-L151
However, the xds-client get the response. It would remove the resources that aren't in the response from local cache. https://github.com/grpc/grpc-go/blob/011544f72939c85397b0e24378280e6075061cb1/xds/internal/xdsclient/pubsub/update.go#L227-L240
Thus, a DeleteResource has been called, the xds-server would respond the deleted resource. But the resource has been deleted, actually it's empty. The xds-client remove the other resource not in the response from its local cache. it causes the grpc-client is unable to connect to other endpoints that haven't been deleted. https://github.com/envoyproxy/go-control-plane/blob/4455b6323de455adf8d0c8afeb3fa5a90652555c/pkg/cache/v3/linear.go#L126-L131