| 201 | } |
| 202 | |
| 203 | func (s *tenantStore) AllowCompaction(ctx context.Context, w tempodb.Writer) error { |
| 204 | if s.noCompactBlockID == nil { |
| 205 | return nil // no block to allow compaction for |
| 206 | } |
| 207 | if err := w.DeleteNoCompactFlag(ctx, s.tenantID, *s.noCompactBlockID); err != nil { |
| 208 | return err |
| 209 | } |
| 210 | s.noCompactBlockID = nil |
| 211 | |
| 212 | return nil |
| 213 | } |
| 214 | |
| 215 | // Adjust the time range based on when the record was added to the partition, factoring in slack and cycle duration. |
| 216 | // Any span with a start or end time outside this range will be constrained to the valid limits. |