MCPcopy
hub / github.com/grafana/tempo / includeCompactedBlock

Function includeCompactedBlock

tempodb/tempodb.go:847–853  ·  view source on GitHub ↗

if block is compacted within lookback period, and is within shard ranges, include it in search

(c *backend.CompactedBlockMeta, id common.ID, blockStart, blockEnd []byte, poll time.Duration, timeStart, timeEnd int64)

Source from the content-addressed store, hash-verified

845
846// if block is compacted within lookback period, and is within shard ranges, include it in search
847func includeCompactedBlock(c *backend.CompactedBlockMeta, id common.ID, blockStart, blockEnd []byte, poll time.Duration, timeStart, timeEnd int64) bool {
848 lookback := time.Now().Add(-(2 * poll))
849 if c.CompactedTime.Before(lookback) {
850 return false
851 }
852 return includeBlock(&c.BlockMeta, id, blockStart, blockEnd, timeStart, timeEnd)
853}
854
855// createLegacyCache uses the config to return a cache and a list of roles.
856func createLegacyCache(cfg *Config, logger gkLog.Logger) (cache.Cache, []cache.Role, error) {

Callers 2

FindMethod · 0.85

Calls 3

includeBlockFunction · 0.70
AddMethod · 0.65
NowMethod · 0.65

Tested by 1