mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4133 from gyuho/event_map_lookup
storage: fix watchable_store notify to hash-lookup once
This commit is contained in:
commit
be57b6b10e
@ -375,10 +375,10 @@ func (s *watchableStore) notify(rev int64, evs []storagepb.Event) {
|
|||||||
we := newWatcherToEventMap(s.synced, evs)
|
we := newWatcherToEventMap(s.synced, evs)
|
||||||
for _, wm := range s.synced {
|
for _, wm := range s.synced {
|
||||||
for w := range wm {
|
for w := range wm {
|
||||||
if _, ok := we[w]; !ok {
|
es, ok := we[w]
|
||||||
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
es := we[w]
|
|
||||||
wr := WatchResponse{WatchID: w.id, Events: es}
|
wr := WatchResponse{WatchID: w.id, Events: es}
|
||||||
select {
|
select {
|
||||||
case w.ch <- wr:
|
case w.ch <- wr:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user