MCPcopy Index your code
hub / github.com/cortexproject/cortex / Ingester

Struct Ingester

pkg/ingester/ingester.go:291–329  ·  view source on GitHub ↗

Ingester deals with "in flight" chunks. Based on Prometheus 1.x MemorySeriesStorage.

Source from the content-addressed store, hash-verified

289// Ingester deals with "in flight" chunks. Based on Prometheus 1.x
290// MemorySeriesStorage.
291type Ingester struct {
292 *services.BasicService
293
294 cfg Config
295
296 metrics *ingesterMetrics
297 validateMetrics *validation.ValidateMetrics
298
299 logger log.Logger
300
301 lifecycler *ring.Lifecycler
302 limits *validation.Overrides
303 limiter *Limiter
304 resourceBasedLimiter *limiter.ResourceBasedLimiter
305 subservicesWatcher *services.FailureWatcher
306
307 stoppedMtx sync.RWMutex // protects stopped
308 stopped bool // protected by stoppedMtx
309
310 // For storing metadata ingested.
311 usersMetadataMtx sync.RWMutex
312 usersMetadata map[string]*userMetricsMetadata
313
314 // Prometheus block storage
315 TSDBState TSDBState
316
317 // Rate of pushed samples. Only used by V2-ingester to limit global samples push rate.
318 ingestionRate *util_math.EwmaRate
319 inflightPushRequests atomic.Int64
320 maxInflightPushRequests util_math.MaxTracker
321
322 inflightQueryRequests atomic.Int64
323 maxInflightQueryRequests util_math.MaxTracker
324
325 matchersCache storecache.MatchersCache
326 expandedPostingsCacheFactory *cortex_tsdb.ExpandedPostingsCacheFactory
327
328 activeQueriedSeriesService *ActiveQueriedSeriesService
329}
330
331// Shipper interface is used to have an easy way to mock it in tests.
332type Shipper interface {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected