Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 24564d8

Browse files
committed
PR comments
1 parent 1ed9307 commit 24564d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mdata/aggmetric.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func (a *AggMetric) add(ts uint32, val float64) {
563563

564564
// collectable returns whether the AggMetric is garbage collectable
565565
// an Aggmetric is collectable based on two conditions:
566-
// * the AggMetric hasn't been written to in a configurable amount
566+
// * the AggMetric hasn't been written to in a configurable amount of time
567567
// (wether the write went to the ROB or a chunk is irrelevant)
568568
// * the last chunk - if any - is no longer "active".
569569
// active means:

mdata/aggmetrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (ms *AggMetrics) GC() {
6262
ms.RLock()
6363
a := ms.Metrics[key]
6464
ms.RUnlock()
65-
if stale := a.GC(now, chunkMinTs, metricMinTs); stale {
65+
if a.GC(now, chunkMinTs, metricMinTs) {
6666
log.Debug("metric %s is stale. Purging data from memory.", key)
6767
ms.Lock()
6868
delete(ms.Metrics, key)

0 commit comments

Comments
 (0)