We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d7e866 commit 9648801Copy full SHA for 9648801
cache/cache.go
@@ -334,9 +334,10 @@ func (c *Cache) Add(p *points.Points) {
334
if c.newMetricsChan != nil && c.newMetricCf != nil {
335
// add metric to new metric channel if missed in bloom
336
// despite what we have it in cache (new behaviour)
337
- if !c.newMetricCf.Has(xxhash.Sum64([]byte(p.Metric))) {
+ hash := xxhash.Sum64([]byte(p.Metric))
338
+ if !c.newMetricCf.Has(hash) {
339
sendMetricToNewMetricChan(c, p.Metric)
- c.newMetricCf.Add(xxhash.Sum64([]byte(p.Metric)))
340
+ c.newMetricCf.Add(hash)
341
}
342
343
0 commit comments