(ctx context.Context, jobID string, errMsg string)
| 431 | } |
| 432 | |
| 433 | func (w *BackendWorker) failJob(ctx context.Context, jobID string, errMsg string) error { |
| 434 | level.Error(log.Logger).Log("msg", "job failed", "job_id", jobID, "error", errMsg) |
| 435 | |
| 436 | err := w.callSchedulerWithBackoff(ctx, func(ctx context.Context) error { |
| 437 | _, err := w.backendScheduler.UpdateJob(ctx, &tempopb.UpdateJobStatusRequest{ |
| 438 | JobId: jobID, |
| 439 | Status: tempopb.JobStatus_JOB_STATUS_FAILED, |
| 440 | Error: errMsg, |
| 441 | }) |
| 442 | if err != nil { |
| 443 | return fmt.Errorf("failed marking job %q as failed: %w", jobID, err) |
| 444 | } |
| 445 | |
| 446 | return nil |
| 447 | }) |
| 448 | if err != nil { |
| 449 | return fmt.Errorf("error marking job %q as failed: %w", jobID, err) |
| 450 | } |
| 451 | |
| 452 | return fmt.Errorf("%s", errMsg) |
| 453 | } |
| 454 | |
| 455 | func (w *BackendWorker) compact(ctx context.Context, blockMetas []*backend.BlockMeta, tenantID string) ([]*backend.BlockMeta, error) { |
| 456 | return w.store.CompactWithConfig(ctx, blockMetas, tenantID, &w.cfg.Compactor, w, w) |
no test coverage detected