envoyproxy / envoyproxy/gateway
Potential unused condition check in internal/xds/server/runner/runner.go
- Vorherrschende Sprache
- Go
- Sterne
- 3k
- Forks
- 864
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 140
Beschreibung
*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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.