envoyproxy / envoyproxy/go-control-plane

ClearSnapshot should clean up watches

Open
#505 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.