Compact compacts source level files into the destination level. Returns ErrNoCompaction if there are no files to compact.
(ctx context.Context, level int)
| 2906 | // Compact compacts source level files into the destination level. |
| 2907 | // Returns ErrNoCompaction if there are no files to compact. |
| 2908 | func (f *VFSFile) Compact(ctx context.Context, level int) (*ltx.FileInfo, error) { |
| 2909 | if f.compactor == nil { |
| 2910 | return nil, fmt.Errorf("compaction not enabled") |
| 2911 | } |
| 2912 | return f.compactor.Compact(ctx, level) |
| 2913 | } |
| 2914 | |
| 2915 | // Snapshot creates a full database snapshot from remote LTX files. |
| 2916 | // Unlike DB.Snapshot(), this reads from remote rather than local WAL. |