From 4814f1da80b4a77be8d2c3365616a608b319bce8 Mon Sep 17 00:00:00 2001 From: Cedric Fung Date: Mon, 18 Mar 2019 13:58:09 +0800 Subject: [PATCH] disable queue cache for unknown issue --- storage/badger_queue.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/storage/badger_queue.go b/storage/badger_queue.go index 2099d943c..03221d547 100644 --- a/storage/badger_queue.go +++ b/storage/badger_queue.go @@ -87,11 +87,6 @@ func (q *Queue) PutCache(ps *PeerSnapshot) error { q.mutex.Lock() defer q.mutex.Unlock() - if q.cacheSet[ps.key] { - return nil - } - q.cacheSet[ps.key] = true - for { put, err := q.cacheRing.Offer(ps) if err != nil || put { @@ -110,7 +105,6 @@ func (q *Queue) PopCache() (*PeerSnapshot, error) { return nil, err } ps := item.(*PeerSnapshot) - delete(q.cacheSet, ps.key) return ps, nil }