grpcproxy: respect CompactRevision in watcher
CompactRevision wasn't sent over watch stream, causing TestKVCompact to hang.
@@ -102,7 +102,7 @@ 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
}
@@ -110,6 +110,7 @@ func (w *watcher) send(wr clientv3.WatchResponse) {
w.post(&pb.WatchResponse{
Header: &wr.Header,
Created: wr.Created,
+ CompactRevision: wr.CompactRevision,
WatchId: w.id,
Events: events,
})
