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

Commit

Permalink
secondaries should also clean up stale metrics
Browse files Browse the repository at this point in the history
fixes #269
  • Loading branch information
woodsaj committed Jan 24, 2017
1 parent beba637 commit a71378d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mdata/aggmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"sync"
"time"

"github.com/raintank/metrictank/cluster"
"github.com/raintank/worldping-api/pkg/log"
)

Expand Down Expand Up @@ -47,9 +46,6 @@ func (ms *AggMetrics) GC() {
unix := time.Duration(time.Now().UnixNano())
diff := ms.gcInterval - (unix % ms.gcInterval)
time.Sleep(diff + time.Minute)
if !cluster.Manager.IsPrimary() {
continue
}
log.Info("checking for stale chunks that need persisting.")
now := uint32(time.Now().Unix())
chunkMinTs := now - (now % ms.chunkSpan) - uint32(ms.chunkMaxStale)
Expand Down

0 comments on commit a71378d

Please sign in to comment.