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

Method setFlushed

modules/blockbuilder/writeable_block.go:57–71  ·  modules/blockbuilder/writeable_block.go::WriteableBlock.setFlushed

TODO - Necessary?

(ctx context.Context)

Source from the content-addressed store, hash-verified

55
56// TODO - Necessary?
57func (b *WriteableBlock) setFlushed(ctx context.Context) error {
58 flushedTime := time.Now()
59 flushedBytes, err := flushedTime.MarshalText()
60 if err != nil {
61 return fmt.Errorf("error marshalling flush time to text: %w", err)
62 }
63
64 err = b.writer.Write(ctx, nameFlushed, (uuid.UUID)(b.BlockMeta().BlockID), b.BlockMeta().TenantID, flushedBytes, nil)
65 if err != nil {
66 return fmt.Errorf("error writing ingester block flushed file: %w", err)
67 }
68
69 b.flushedTime.Store(flushedTime.Unix())
70 return nil
71}

Callers 1

WriteMethod · 0.95

Implementers 1

WriteableBlockmodules/blockbuilder/writeable_block.g

Calls 4

BlockMetaMethod · 0.95
NowMethod · 0.65
WriteMethod · 0.65
StoreMethod · 0.65

Tested by

no test coverage detected