-
Notifications
You must be signed in to change notification settings - Fork 551
Open
Labels
Description
go-control-plane/pkg/cache/v3/simple.go
Lines 264 to 270 in 5284181
| func (cache *snapshotCache) ClearSnapshot(node string) { | |
| cache.mu.Lock() | |
| defer cache.mu.Unlock() | |
| delete(cache.snapshots, node) | |
| delete(cache.status, node) | |
| } |
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.