Merge pull request #7319 from heyitsanthony/fix-compact-watch

grpcproxy: respect CompactRevision in watcher
This commit is contained in:
Anthony Romano 2017-02-13 16:46:34 -08:00 committed by GitHub
commit c200be6432

View File

@ -102,7 +102,7 @@ func (w *watcher) send(wr clientv3.WatchResponse) {
} }
// all events are filtered out? // all events are filtered out?
if !wr.IsProgressNotify() && !wr.Created && len(events) == 0 { if !wr.IsProgressNotify() && !wr.Created && len(events) == 0 && wr.CompactRevision == 0 {
return return
} }
@ -110,6 +110,7 @@ func (w *watcher) send(wr clientv3.WatchResponse) {
w.post(&pb.WatchResponse{ w.post(&pb.WatchResponse{
Header: &wr.Header, Header: &wr.Header,
Created: wr.Created, Created: wr.Created,
CompactRevision: wr.CompactRevision,
WatchId: w.id, WatchId: w.id,
Events: events, Events: events,
}) })