envoyproxy / envoyproxy/java-control-plane

Watch Created with Empty Resource Names

未关闭
#411 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
312
派生
149
PR 合并指标
30 天内没有已合并 PR

描述

According to the [Envoy xDS protocol documentation](https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#how-the-client-specifies-what-resources-to-return):
```
If the list of resource names becomes empty, that means the client is no longer interested in any resources of the specified type.
```

However, the `DiscoveryRequestStreamObserver` currently creates a new watch even when the resource names list becomes empty, which violates the spec.
https://github.com/envoyproxy/java-control-plane/blob/main/server/src/main/java/io/envoyproxy/controlplane/server/DiscoveryRequestStreamObserver.java#L80-L94

I think we can just cancel the previous watch and not create another one in this case. Please let me know if this makes sense, and I’ll be happy to submit a PR.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。