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

Method getTSDBUsers

pkg/ingester/ingester.go:2764–2774  ·  view source on GitHub ↗

List all users for which we have a TSDB. We do it here in order to keep the mutex locked for the shortest time possible.

()

Source from the content-addressed store, hash-verified

2762// List all users for which we have a TSDB. We do it here in order
2763// to keep the mutex locked for the shortest time possible.
2764func (i *Ingester) getTSDBUsers() []string {
2765 i.stoppedMtx.RLock()
2766 defer i.stoppedMtx.RUnlock()
2767
2768 ids := make([]string, 0, len(i.TSDBState.dbs))
2769 for userID := range i.TSDBState.dbs {
2770 ids = append(ids, userID)
2771 }
2772
2773 return ids
2774}
2775
2776func (i *Ingester) getOrCreateTSDB(userID string, force bool) (*userTSDB, error) {
2777 db, err := i.getTSDB(userID)

Callers 10

updateUserTSDBConfigsMethod · 0.95
updateActiveSeriesMethod · 0.95
updateLabelSetMetricsMethod · 0.95
shipBlocksMethod · 0.95
compactBlocksMethod · 0.95
expirePostingsCacheMethod · 0.95
TestIngesterDeletionRaceFunction · 0.80

Implementers 1

Ingesterpkg/ingester/ingester.go

Calls

no outgoing calls

Tested by 2

TestIngesterDeletionRaceFunction · 0.64