Skip to content

[pull] main from prometheus:main #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged
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
3 changes: 2 additions & 1 deletion tsdb/head.go
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ func (h *Head) Init(minValidTime int64) error {
}
// Backfill segments from the most recent checkpoint onwards.
for i := startFrom; i <= endAt; i++ {
walSegmentStart := time.Now()
s, err := wlog.OpenReadSegment(wlog.SegmentName(h.wal.Dir(), i))
if err != nil {
return fmt.Errorf("open WAL segment: %d: %w", i, err)
Expand All @@ -808,7 +809,7 @@ func (h *Head) Init(minValidTime int64) error {
if err != nil {
return err
}
h.logger.Info("WAL segment loaded", "segment", i, "maxSegment", endAt)
h.logger.Info("WAL segment loaded", "segment", i, "maxSegment", endAt, "duration", time.Since(walSegmentStart))
h.updateWALReplayStatusRead(i)
}
walReplayDuration := time.Since(walReplayStart)
Expand Down
Loading