mirror of
https://github.com/hanzoai/metrics.git
synced 2026-10-30 20:03:39 +00:00
This should reduce disk space occupied by indexDBs as they get deleted along with the corresponding partitions once those partitions become outside the retention window. - Motivation: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7599 - What to expect: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8134 Signed-off-by: Artem Fetishev <[email protected]> Co-authored-by: Andrei Baidarov <[email protected]>
16 lines
494 B
Go
16 lines
494 B
Go
package mergeset
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
|
)
|
|
|
|
// LegacyMustCreateSnapshotAt is used for creating snapshots for legacy IndexDBs.
|
|
func (tb *Table) LegacyMustCreateSnapshotAt(dstDir string) {
|
|
logger.Infof("creating legacy IndexDB snapshot of %q...", tb.path)
|
|
startTime := time.Now()
|
|
tb.MustCreateSnapshotAt(dstDir)
|
|
logger.Infof("created legacy IndexDB snapshot of %q at %q in %.3f seconds", tb.path, dstDir, time.Since(startTime).Seconds())
|
|
}
|