From 853f68071bfb0057190a4f6ca86fe3b85e6fd4ca Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Mon, 13 Feb 2017 13:27:56 -0800 Subject: [PATCH] grpcproxy: respect CompactRevision in watcher CompactRevision wasn't sent over watch stream, causing TestKVCompact to hang. --- proxy/grpcproxy/watcher.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/proxy/grpcproxy/watcher.go b/proxy/grpcproxy/watcher.go index e860a69ce..7387caf4d 100644 --- a/proxy/grpcproxy/watcher.go +++ b/proxy/grpcproxy/watcher.go @@ -102,16 +102,17 @@ func (w *watcher) send(wr clientv3.WatchResponse) { } // 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 } w.lastHeader = wr.Header w.post(&pb.WatchResponse{ - Header: &wr.Header, - Created: wr.Created, - WatchId: w.id, - Events: events, + Header: &wr.Header, + Created: wr.Created, + CompactRevision: wr.CompactRevision, + WatchId: w.id, + Events: events, }) }