Tombstone renames the block's meta.json to meta.deleted.json. See common.WALBlock.Tombstone for semantics.
()
| 530 | // Tombstone renames the block's meta.json to meta.deleted.json. |
| 531 | // See common.WALBlock.Tombstone for semantics. |
| 532 | func (b *walBlock) Tombstone() error { |
| 533 | from := filepath.Join(b.walPath(), backend.MetaName) |
| 534 | to := filepath.Join(b.walPath(), backend.DeletedMetaName) |
| 535 | if err := os.Rename(from, to); err != nil { |
| 536 | if os.IsNotExist(err) { |
| 537 | return nil |
| 538 | } |
| 539 | return fmt.Errorf("failed to tombstone wal block %s: %w", b.meta.BlockID, err) |
| 540 | } |
| 541 | return nil |
| 542 | } |
| 543 | |
| 544 | func (b *walBlock) FindTraceByID(ctx context.Context, id common.ID, opts common.SearchOptions) (*tempopb.TraceByIDResponse, error) { |
| 545 | ctx, span := tracer.Start(ctx, "walBlock.FindTraceByID") |