diff --git a/lib/streamaggr/dedup.go b/lib/streamaggr/dedup.go index d04980dba..1374a0e74 100644 --- a/lib/streamaggr/dedup.go +++ b/lib/streamaggr/dedup.go @@ -196,7 +196,7 @@ func (das *dedupAggrShard) flush(ctx *dedupFlushCtx, f func(samples []pushSample das.m = make(map[string]*dedupAggrSample, len(m)) das.sizeBytes.Store(0) das.itemsCount.Store(0) - das.samplesBuf = das.samplesBuf[:0] + das.samplesBuf = make([]dedupAggrSample, 0, len(das.samplesBuf)) } das.mu.Unlock()