Using block store, the ingester is only available when it is in a Running state. The ingester is not available when stopping to prevent any read or writes to the TSDB after the ingester has closed them.
()
| 1238 | // Using block store, the ingester is only available when it is in a Running state. The ingester is not available |
| 1239 | // when stopping to prevent any read or writes to the TSDB after the ingester has closed them. |
| 1240 | func (i *Ingester) checkRunning() error { |
| 1241 | s := i.State() |
| 1242 | if s == services.Running { |
| 1243 | return nil |
| 1244 | } |
| 1245 | return status.Error(codes.Unavailable, s.String()) |
| 1246 | } |
| 1247 | |
| 1248 | // GetRef() is an extra method added to TSDB to let Cortex check before calling Add() |
| 1249 | type extendedAppender interface { |
no test coverage detected