mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-21 07:17:30 +01:00
Add log about checkpoint archiving
Entire-Checkpoint: bf29af79b268
This commit is contained in:
@@ -171,6 +171,9 @@ func deleteCheckpoints(checkpointsDir string, from int64) (int, error) {
|
|||||||
// Each host's rows are written as a separate row group to avoid accumulating
|
// Each host's rows are written as a separate row group to avoid accumulating
|
||||||
// all data in memory at once.
|
// all data in memory at once.
|
||||||
func archiveCheckpoints(checkpointsDir, cleanupDir string, from int64) (int, error) {
|
func archiveCheckpoints(checkpointsDir, cleanupDir string, from int64) (int, error) {
|
||||||
|
cclog.Info("[METRICSTORE]> start archiving checkpoints to parquet")
|
||||||
|
startTime := time.Now()
|
||||||
|
|
||||||
clusterEntries, err := os.ReadDir(checkpointsDir)
|
clusterEntries, err := os.ReadDir(checkpointsDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
@@ -300,5 +303,6 @@ func archiveCheckpoints(checkpointsDir, cleanupDir string, from int64) (int, err
|
|||||||
writer.count, totalFiles, cluster, parquetFile)
|
writer.count, totalFiles, cluster, parquetFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cclog.Infof("[METRICSTORE]> archiving checkpoints completed in %s (%d files)", time.Since(startTime).Round(time.Millisecond), totalFiles)
|
||||||
return totalFiles, nil
|
return totalFiles, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user