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

Method ObjectAdded

tempodb/backend/block_meta.go:255–271  ·  view source on GitHub ↗

ObjectAdded updates the block meta appropriately based on information about an added record start/end are unix epoch seconds, when 0 the start and the end are not applied.

(start, end uint32)

Source from the content-addressed store, hash-verified

253// ObjectAdded updates the block meta appropriately based on information about an added record
254// start/end are unix epoch seconds, when 0 the start and the end are not applied.
255func (b *BlockMeta) ObjectAdded(start, end uint32) {
256 if start > 0 {
257 startTime := time.Unix(int64(start), 0)
258 if b.StartTime.IsZero() || startTime.Before(b.StartTime) {
259 b.StartTime = startTime
260 }
261 }
262
263 if end > 0 {
264 endTime := time.Unix(int64(end), 0)
265 if b.EndTime.IsZero() || endTime.After(b.EndTime) {
266 b.EndTime = endTime
267 }
268 }
269
270 b.TotalObjects++
271}
272
273func (b *BlockMeta) DedicatedColumnsHash() uint64 {
274 return b.DedicatedColumns.Hash()

Callers 13

TestBlockMetaObjectAddedFunction · 0.95
openWALBlockFunction · 0.80
AppendTraceMethod · 0.80
AddMethod · 0.80
AddRawMethod · 0.80
openWALBlockFunction · 0.80
AppendTraceMethod · 0.80
AddMethod · 0.80
AddRawMethod · 0.80
openWALBlockFunction · 0.80
AppendTraceMethod · 0.80
AddMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestBlockMetaObjectAddedFunction · 0.76