From bf2581390dae876700692174b6ee9d8a21856545 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 28 Sep 2016 16:47:33 -0700 Subject: [PATCH 1/2] clientv3: make IsProgressNotify() false on compact event and closed channel Fixes #6549 --- clientv3/watch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientv3/watch.go b/clientv3/watch.go index 28eb491e48a..78d810d41d3 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -92,7 +92,7 @@ func (wr *WatchResponse) Err() error { // IsProgressNotify returns true if the WatchResponse is progress notification. func (wr *WatchResponse) IsProgressNotify() bool { - return len(wr.Events) == 0 && !wr.Canceled && !wr.Created + return len(wr.Events) == 0 && !wr.Canceled && !wr.Created && wr.CompactRevision == 0 && wr.Header.Revision != 0 } // watcher implements the Watcher interface From 6ac284a577d8ba2117485ec887380f0d5a4980f3 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Thu, 29 Sep 2016 10:45:25 -0700 Subject: [PATCH 2/2] grpcproxy: use valid progress notification in broadcast test --- proxy/grpcproxy/watcher_group_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/grpcproxy/watcher_group_test.go b/proxy/grpcproxy/watcher_group_test.go index 8284bd7e7dc..188f9a186d3 100644 --- a/proxy/grpcproxy/watcher_group_test.go +++ b/proxy/grpcproxy/watcher_group_test.go @@ -40,7 +40,7 @@ func TestWatchgroupBroadcast(t *testing.T) { } // send a progress response - wch <- clientv3.WatchResponse{} + wch <- clientv3.WatchResponse{Header: pb.ResponseHeader{Revision: 1}} for _, ch := range chs { <-ch