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

Method FailJob

modules/backendscheduler/work/work.go:339–356  ·  view source on GitHub ↗

FailJob marks a job as failed in the appropriate shard

(id string)

Source from the content-addressed store, hash-verified

337
338// FailJob marks a job as failed in the appropriate shard
339func (w *Work) FailJob(id string) {
340 shard := w.getShard(id)
341 shard.mtx.Lock()
342 var j *Job
343 if jj, ok := shard.Jobs[id]; ok {
344 jj.Fail()
345 j = jj
346 }
347 shard.mtx.Unlock()
348
349 if j != nil {
350 w.pendingMtx.Lock()
351 for _, key := range runningBlockKeys(j) {
352 delete(w.runningBlocks, key)
353 }
354 w.pendingMtx.Unlock()
355 }
356}
357
358// SetJobCompactionOutput sets compaction output for a job in the appropriate shard
359func (w *Work) SetJobCompactionOutput(id string, output []string) {

Callers

nothing calls this directly

Calls 3

getShardMethod · 0.95
runningBlockKeysFunction · 0.85
FailMethod · 0.80

Tested by

no test coverage detected