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

Method enqueueCompleteOp

modules/livestore/live_store_background.go:252–267  ·  view source on GitHub ↗
(tenantID string, blockID uuid.UUID, jitter bool)

Source from the content-addressed store, hash-verified

250}
251
252func (s *LiveStore) enqueueCompleteOp(tenantID string, blockID uuid.UUID, jitter bool) error {
253 op := &completeOp{
254 tenantID: tenantID,
255 blockID: blockID,
256 // Initial priority and backoff
257 at: time.Now(),
258 bo: s.cfg.initialBackoff,
259 maxBackoff: s.cfg.maxBackoff,
260 }
261
262 if jitter {
263 return s.enqueueOpWithJitter(op)
264 }
265
266 return s.enqueueOp(op)
267}
268
269func (s *LiveStore) enqueueOpWithJitter(op *completeOp) error {
270 delay := time.Duration(rand.Int64N(10_000) * int64(time.Millisecond)) //gosec:disable G404 — It doesn't require strong randomness

Callers 2

cutOneInstanceToWalMethod · 0.95
reloadBlocksMethod · 0.95

Calls 3

enqueueOpWithJitterMethod · 0.95
enqueueOpMethod · 0.95
NowMethod · 0.65

Tested by

no test coverage detected