Skip to content

Commit

Permalink
Merge pull request #593 from deniszh/DZ-cuckoo-fix2
Browse files Browse the repository at this point in the history
Let's not delete values from boom filter
  • Loading branch information
deniszh authored Jun 25, 2024
2 parents c9ef183 + d4e1c11 commit ab304e7
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,6 @@ func (c *Cache) Pop(key string) (p *points.Points, exists bool) {
delete(shard.items, key)
shard.Unlock()

// we probably can skip that, but I'm a bit worry
// of effectiveness of bloom filter over time
if c.newMetricsChan != nil && c.newMetricCf != nil {
c.newMetricCf.Delete([]byte(p.Metric))
}

if exists {
atomic.AddInt32(&c.stat.size, -int32(len(p.Data)))
}
Expand All @@ -383,12 +377,6 @@ func (c *Cache) PopNotConfirmed(key string) (p *points.Points, exists bool) {
}
shard.Unlock()

// we probably can skip that, but I'm a bit worry
// of effectiveness of bloom filter over time
if c.newMetricsChan != nil && c.newMetricCf != nil {
c.newMetricCf.Delete([]byte(p.Metric))
}

if exists {
atomic.AddInt32(&c.stat.size, -int32(len(p.Data)))
}
Expand Down

0 comments on commit ab304e7

Please sign in to comment.