From 7ef6ebd5eb2bf52c06c83aadff576563deb60ee0 Mon Sep 17 00:00:00 2001 From: yangweiwei Date: Mon, 22 Feb 2021 14:10:25 +0800 Subject: [PATCH] mvcc: optimize watch logic of watchableStore Optimize watchableStore.watch func --- server/mvcc/watchable_store.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/mvcc/watchable_store.go b/server/mvcc/watchable_store.go index 848e1bf8b..50782d1af 100644 --- a/server/mvcc/watchable_store.go +++ b/server/mvcc/watchable_store.go @@ -131,8 +131,6 @@ func (s *watchableStore) watch(key, end []byte, startRev int64, id WatchID, ch c if startRev > wa.minRev { wa.minRev = startRev } - } - if synced { s.synced.add(wa) } else { slowWatcherGauge.Inc()