(ctx context.Context, w tempodb.Writer)
| 109 | } |
| 110 | |
| 111 | func (p *writer) allowCompaction(ctx context.Context, w tempodb.Writer) { |
| 112 | ctx, span := tracer.Start( |
| 113 | ctx, "writer.allowCompaction", |
| 114 | trace.WithAttributes( |
| 115 | attribute.Int("partition", int(p.partition)), |
| 116 | attribute.String("section_start_time", p.startTime.String()), |
| 117 | ), |
| 118 | ) |
| 119 | defer span.End() |
| 120 | |
| 121 | wg := sync.WaitGroup{} |
| 122 | wg.Add(len(p.m)) |
| 123 | for _, i := range p.m { |
| 124 | go func() { |
| 125 | defer wg.Done() |
| 126 | level.Info(p.logger).Log("msg", "allowing compaction", "tenant", i.tenantID) |
| 127 | err := i.AllowCompaction(ctx, w) |
| 128 | if err != nil { |
| 129 | level.Error(p.logger).Log("msg", "failed to allow compaction, the block will remain uncompacted", "tenant", i.tenantID, "err", err) |
| 130 | } |
| 131 | }() |
| 132 | } |
| 133 | wg.Wait() |
| 134 | } |
| 135 | |
| 136 | func (p *writer) instanceForTenant(tenant string) (*tenantStore, error) { |
| 137 | p.mtx.Lock() |
no test coverage detected