Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fracmanager/fracmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func startStatsWorker(ctx context.Context, cfg *Config, reg *fractionRegistry, w
stats.SetMetrics() // Update Prometheus metrics

corruptions := countDocsFiles(filepath.Join(cfg.DataDir, consts.BrokenDir))
walCorruptionsTotal.Add(float64(corruptions))
walCorruptions.Set(float64(corruptions))
})
logger.Info("stats loop is stopped")
}()
Expand Down
4 changes: 2 additions & 2 deletions fracmanager/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ var (
Help: "Number of bytes read from disk storage",
})

walCorruptionsTotal = promauto.NewGauge(prometheus.GaugeOpts{
walCorruptions = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "seq_db_store",
Subsystem: "storage",
Name: "wal_corruptions_total",
Name: "wal_corruptions",
Help: "Number of WAL files with detected corruption during replay",
})
)
2 changes: 1 addition & 1 deletion util/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func CopyFile(src, dst string) error {
}
defer in.Close()

out, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC, 0o666)
out, err := os.OpenFile(dst, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o666)
if err != nil {
return err
}
Expand Down
Loading