Skip to content
/ etcd Public
forked from etcd-io/etcd

Commit

Permalink
clientv3: do not backport watch compact revision change
Browse files Browse the repository at this point in the history
Do not backport etcd-io#8283.

Signed-off-by: Gyu-Ho Lee <[email protected]>
  • Loading branch information
gyuho committed Nov 14, 2017
1 parent d907cb2 commit 607d0e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions clientv3/integration/watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion clientv3/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 607d0e7

Please sign in to comment.