diff --git a/server/storage/mvcc/watchable_store.go b/server/storage/mvcc/watchable_store.go index ae5c551fdfe6..33114fc51aaa 100644 --- a/server/storage/mvcc/watchable_store.go +++ b/server/storage/mvcc/watchable_store.go @@ -370,6 +370,12 @@ func (s *watchableStore) syncWatchers() int { victims := make(watcherBatch) wb := newWatcherBatch(wg, evs) for w := range wg.watchers { + if w.minRev < compactionRev { + // skip the watcher that failed to send compacted watch response due to w.ch is full + // next retry of syncWatchers would try to resend the compacted watch response to w.ch + // TODO prioritize sending compacted watch response over other watch responses with events. + continue + } w.minRev = curRev + 1 eb, ok := wb[w]