envoyproxy / envoyproxy/gateway
Potential unused condition check in internal/xds/server/runner/runner.go
- Ngôn ngữ chính
- Go
- Star
- 3k
- Fork
- 864
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 140
Mô tả
*Description*:
>Describe the issue.
There is a nil check in the
https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/server/runner/runner.go#L137-L139
However, `r.cache` is initialized in https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/server/runner/runner.go#L80 and `NewSnapshotCache` never returns a nil from it:
https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/cache/snapshotcache.go#L108-L117
IMHO, the logger message is suspicious because the code around doesn't `init snapshot cache`. It could be a remnant of a previous refactor.
[optional *Relevant Links*:]
>Any extra documentation required to understand the issue.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.