Fix errors from merge

This commit is contained in:
Jeanette Tan 2023-05-23 00:56:57 +08:00
parent 1be0816b46
commit 9f1baaaa38
3 changed files with 5 additions and 5 deletions

View file

@ -490,7 +490,7 @@ func counterResetHint(crh CounterResetHeader, numRead uint16) histogram.CounterR
// Handle pathological case of empty span when advancing span idx. // Handle pathological case of empty span when advancing span idx.
func nextNonEmptySpanSliceIdx(idx int, spans []histogram.Span) (newIdx int) { func nextNonEmptySpanSliceIdx(idx int, spans []histogram.Span) (newIdx int) {
for idx++; idx < len(spans) && spans[idx].Length == 0; idx++ { for idx++; idx < len(spans) && spans[idx].Length == 0; idx++ { //nolint:revive // This "empty" block is intentional
} }
return idx return idx
} }

View file

@ -896,10 +896,10 @@ func debugOutOfOrderChunks(chks []chunks.Meta, logger log.Logger) {
} }
// Looks like the chunk is out of order. // Looks like the chunk is out of order.
prevSafeChk, prevIsSafeChk := prevChk.Chunk.(*safeChunk) prevSafeChk, prevIsSafeChk := prevChk.Chunk.(*safeHeadChunk)
currSafeChk, currIsSafeChk := currChk.Chunk.(*safeChunk) currSafeChk, currIsSafeChk := currChk.Chunk.(*safeHeadChunk)
// Get info out of safeChunk (if possible). // Get info out of safeHeadChunk (if possible).
prevHeadChunkID := chunks.HeadChunkID(0) prevHeadChunkID := chunks.HeadChunkID(0)
currHeadChunkID := chunks.HeadChunkID(0) currHeadChunkID := chunks.HeadChunkID(0)
prevLabels := labels.Labels{} prevLabels := labels.Labels{}

View file

@ -314,7 +314,7 @@ func inversePostingsForMatcher(ix IndexPostingsReader, m *labels.Matcher) (index
// Inverse of a MatchNotRegexp is MatchRegexp (double negation). // Inverse of a MatchNotRegexp is MatchRegexp (double negation).
// Fast-path for set matching. // Fast-path for set matching.
if m.Type == labels.MatchNotRegexp { if m.Type == labels.MatchNotRegexp {
setMatches := findSetMatches(m.GetRegexString()) setMatches := m.SetMatches()
if len(setMatches) > 0 { if len(setMatches) > 0 {
return ix.Postings(m.Name, setMatches...) return ix.Postings(m.Name, setMatches...)
} }