expandedpostingscache

package
v0.42.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemHashString

func MemHashString(str string) uint64

func NewCachedBlockChunkQuerier

func NewCachedBlockChunkQuerier(cache ExpandedPostingsCache, b prom_tsdb.BlockReader, mint, maxt int64) (storage.ChunkQuerier, error)

Types

type BlocksPostingsForMatchersCache

type BlocksPostingsForMatchersCache struct {
	// contains filtered or unexported fields
}

func NewBlocksPostingsForMatchersCache

func NewBlocksPostingsForMatchersCache(metrics ExpandedPostingsCacheMetrics, headExpandedPostingsCacheSize uint64, blockExpandedPostingsCacheSize uint64, seedSize int64) *BlocksPostingsForMatchersCache

func (*BlocksPostingsForMatchersCache) ExpireSeries

func (c *BlocksPostingsForMatchersCache) ExpireSeries(metric labels.Labels)

func (*BlocksPostingsForMatchersCache) PostCreation

func (c *BlocksPostingsForMatchersCache) PostCreation(metric labels.Labels)

func (*BlocksPostingsForMatchersCache) PostDeletion

func (c *BlocksPostingsForMatchersCache) PostDeletion(metrics map[chunks.HeadSeriesRef]labels.Labels)

func (*BlocksPostingsForMatchersCache) PostingsForMatchers

func (c *BlocksPostingsForMatchersCache) PostingsForMatchers(ctx context.Context, blockID ulid.ULID, ix tsdb.IndexReader, ms ...*labels.Matcher) (index.Postings, error)

func (*BlocksPostingsForMatchersCache) PreCreation

type ExpandedPostingsCache

type ExpandedPostingsCache interface {
	PostingsForMatchers(ctx context.Context, blockID ulid.ULID, ix tsdb.IndexReader, ms ...*labels.Matcher) (index.Postings, error)
	ExpireSeries(metric labels.Labels)
	tsdb.SeriesLifecycleCallback
}

type ExpandedPostingsCacheMetrics

type ExpandedPostingsCacheMetrics struct {
	CacheRequests       *prometheus.CounterVec
	CacheHits           *prometheus.CounterVec
	CacheEvicts         *prometheus.CounterVec
	NonCacheableQueries *prometheus.CounterVec
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL