mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

The single watcher / group watcher distinction limited and complicated watcher coalescing more than necessary. Reworked: Each server watcher is represented by a WatchBroadcast, each client "Watcher" attaches to some WatchBroadcast. WatchBroadcasts hold all WatchBroadcast instances for a range. WatchRanges holds all WatchBroadcasts for the proxy. WatchProxyStreams represent a grpc watch stream between the proxy and a client. When a client requests a new watcher through its grpc stream, the ProxyStream will allocate a Watcher and WatchRanges assigns it to some WatchBroadcast based on its range. Coalescing is done by WatchBroadcasts when it receives an update notification from a WatchBroadcast. Supports leader failure detection so watches on a bad member can migrate to other members. Coincidentally, Fixes #6303.