envoyproxy / envoyproxy/go-control-plane
ClearSnapshot should clean up watches
Open
no stalebot
- Dominant language
- Go
- Stars
- 1.7k
- Forks
- 567
- Avg merge
- 15h 46m
- Merged PRs (30d)
- 11
Description
https://github.com/envoyproxy/go-control-plane/blob/52841810f634e67b22441ee50006655abadbc99c/pkg/cache/v3/simple.go#L264-L270
ClearSnapshot deletes the status for a node, but the states can have watches in it that will now never get triggered. Perhaps the right approach is to close the watch channels. However, looking at the SOTW server, closing any of the watch channels will make the stream handler error out.
So it's not obvious to me what the behavior of watches should be when a snapshot is cleared, but it seems something should happen since a subsequent SetSnapshot would not trigger any watches.
Contributor guide
Assessment
This issue has not been assessed yet.