mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-08 16:12:16 -04:00
Address linter errors
Signed-off-by: Patryk Prus <p@trykpr.us>
This commit is contained in:
parent
0fea41ed53
commit
5cb0192626
3 changed files with 3 additions and 4 deletions
|
|
@ -781,7 +781,7 @@ func (h *Head) Init(minValidTime int64) error {
|
|||
|
||||
// A corrupted checkpoint is a hard error for now and requires user
|
||||
// intervention. There's likely little data that can be recovered anyway.
|
||||
if err := h.loadWAL(wlog.NewReader(sr), syms, multiRef, mmappedChunks, oooMmappedChunks, endAt); err != nil {
|
||||
if err := h.loadWAL(wlog.NewReader(sr), syms, multiRef, mmappedChunks, oooMmappedChunks); err != nil {
|
||||
return fmt.Errorf("backfill checkpoint: %w", err)
|
||||
}
|
||||
h.updateWALReplayStatusRead(startFrom)
|
||||
|
|
@ -815,7 +815,7 @@ func (h *Head) Init(minValidTime int64) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("segment reader (offset=%d): %w", offset, err)
|
||||
}
|
||||
err = h.loadWAL(wlog.NewReader(sr), syms, multiRef, mmappedChunks, oooMmappedChunks, endAt)
|
||||
err = h.loadWAL(wlog.NewReader(sr), syms, multiRef, mmappedChunks, oooMmappedChunks)
|
||||
if err := sr.Close(); err != nil {
|
||||
h.logger.Warn("Error while closing the wal segments reader", "err", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,7 +891,6 @@ func TestHead_WALMultiRef(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestHead_WALCheckpointMultiRef(t *testing.T) {
|
||||
|
||||
cases := []struct {
|
||||
name string
|
||||
walEntries []interface{}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ func counterAddNonZero(v *prometheus.CounterVec, value float64, lvs ...string) {
|
|||
}
|
||||
}
|
||||
|
||||
func (h *Head) loadWAL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[chunks.HeadSeriesRef]chunks.HeadSeriesRef, mmappedChunks, oooMmappedChunks map[chunks.HeadSeriesRef][]*mmappedChunk, lastSegment int) (err error) {
|
||||
func (h *Head) loadWAL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[chunks.HeadSeriesRef]chunks.HeadSeriesRef, mmappedChunks, oooMmappedChunks map[chunks.HeadSeriesRef][]*mmappedChunk) (err error) {
|
||||
// Track number of missing series records that were referenced by other records.
|
||||
unknownSeriesRefs := &seriesRefSet{refs: make(map[chunks.HeadSeriesRef]struct{}), mtx: sync.Mutex{}}
|
||||
// Track number of different records that referenced a series we don't know about
|
||||
|
|
|
|||
Loading…
Reference in a new issue