MCPcopy Create free account
hub / github.com/cortexproject/cortex / purgeUserMetricsMetadata

Method purgeUserMetricsMetadata

pkg/ingester/ingester.go:3550–3562  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3548}
3549
3550func (i *Ingester) purgeUserMetricsMetadata() {
3551 deadline := time.Now().Add(-i.cfg.MetadataRetainPeriod)
3552
3553 for _, userID := range i.getUsersWithMetadata() {
3554 metadata := i.getUserMetadata(userID)
3555 if metadata == nil {
3556 continue
3557 }
3558
3559 // Remove all metadata that we no longer need to retain.
3560 metadata.purge(deadline)
3561 }
3562}
3563
3564// This method will flush all data. It is called as part of Lifecycler's shutdown (if flush on shutdown is configured), or from the flusher.
3565//

Callers 1

updateLoopMethod · 0.95

Implementers 1

Ingesterpkg/ingester/ingester.go

Calls 4

getUsersWithMetadataMethod · 0.95
getUserMetadataMethod · 0.95
AddMethod · 0.45
purgeMethod · 0.45

Tested by

no test coverage detected