(userID string)
| 2750 | } |
| 2751 | |
| 2752 | func (i *Ingester) getTSDB(userID string) (*userTSDB, error) { |
| 2753 | i.stoppedMtx.RLock() |
| 2754 | defer i.stoppedMtx.RUnlock() |
| 2755 | db := i.TSDBState.dbs[userID] |
| 2756 | if db == nil { |
| 2757 | return nil, errNoUserDb |
| 2758 | } |
| 2759 | return db, nil |
| 2760 | } |
| 2761 | |
| 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. |
no outgoing calls