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

Method casState

pkg/ingester/ingester.go:453–462  ·  view source on GitHub ↗
(from, to tsdbState)

Source from the content-addressed store, hash-verified

451}
452
453func (u *userTSDB) casState(from, to tsdbState) bool {
454 u.stateMtx.Lock()
455 defer u.stateMtx.Unlock()
456
457 if u.state != from {
458 return false
459 }
460 u.state = to
461 return true
462}
463
464// compactHead compacts the Head block at specified block durations avoiding a single huge block.
465func (u *userTSDB) compactHead(ctx context.Context, blockDuration int64) error {

Calls

no outgoing calls