From 607d0e7188115405fa2e9bbaad06e7fa248449db Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 13 Nov 2017 17:08:00 -0800 Subject: [PATCH] clientv3: do not backport watch compact revision change Do not backport https://github.com/coreos/etcd/pull/8283. Signed-off-by: Gyu-Ho Lee --- clientv3/integration/watch_test.go | 3 --- clientv3/watch.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/clientv3/integration/watch_test.go b/clientv3/integration/watch_test.go index 9a7f2d721efd..d92433b67332 100644 --- a/clientv3/integration/watch_test.go +++ b/clientv3/integration/watch_test.go @@ -516,9 +516,6 @@ func TestWatchCompactRevision(t *testing.T) { if wresp.Err() != rpctypes.ErrCompacted { t.Fatalf("wresp.Err() expected %v, but got %v", rpctypes.ErrCompacted, wresp.Err()) } - if !wresp.Canceled { - t.Fatalf("wresp.Canceled expected true, got %+v", wresp) - } // ensure the channel is closed if wresp, ok = <-wch; ok { diff --git a/clientv3/watch.go b/clientv3/watch.go index eb7d234baee0..12977aed8966 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -463,7 +463,7 @@ func (w *watchGrpcStream) run() { if ws := w.nextResume(); ws != nil { wc.Send(ws.initReq.toPB()) } - case pbresp.Canceled && pbresp.CompactRevision == 0: + case pbresp.Canceled: delete(cancelSet, pbresp.WatchId) if ws, ok := w.substreams[pbresp.WatchId]; ok { // signal to stream goroutine to update closingc