TODO - Necessary?
(ctx context.Context)
| 55 | |
| 56 | // TODO - Necessary? |
| 57 | func (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 | } |