()
| 3548 | } |
| 3549 | |
| 3550 | func (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 | // |
no test coverage detected