(ctx context.Context)
| 3342 | } |
| 3343 | |
| 3344 | func (i *Ingester) closeAndDeleteIdleUserTSDBs(ctx context.Context) error { |
| 3345 | for _, userID := range i.getTSDBUsers() { |
| 3346 | if ctx.Err() != nil { |
| 3347 | return nil |
| 3348 | } |
| 3349 | |
| 3350 | result := i.closeAndDeleteUserTSDBIfIdle(userID) |
| 3351 | |
| 3352 | i.TSDBState.idleTsdbChecks.WithLabelValues(string(result)).Inc() |
| 3353 | } |
| 3354 | |
| 3355 | return nil |
| 3356 | } |
| 3357 | |
| 3358 | func (i *Ingester) expirePostingsCache(ctx context.Context) error { |
| 3359 | for _, userID := range i.getTSDBUsers() { |