Skip to content

Commit

Permalink
disable queue cache for unknown issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Mar 18, 2019
1 parent 696e6c5 commit 4814f1d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions storage/badger_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -110,7 +105,6 @@ func (q *Queue) PopCache() (*PeerSnapshot, error) {
return nil, err
}
ps := item.(*PeerSnapshot)
delete(q.cacheSet, ps.key)
return ps, nil
}

Expand Down

0 comments on commit 4814f1d

Please sign in to comment.