diff --git a/pkg/block/indexheader/binary_reader.go b/pkg/block/indexheader/binary_reader.go index 1d1e6603cb..1afaabb786 100644 --- a/pkg/block/indexheader/binary_reader.go +++ b/pkg/block/indexheader/binary_reader.go @@ -852,7 +852,6 @@ func (r *BinaryReader) postingsOffset(name string, values ...string) ([]index.Ra } var newSameRngs []index.Range // The start, end offsets in the postings table in the original index file. -OUTER: for valueIndex < len(values) { wantedValue := values[valueIndex] @@ -876,6 +875,7 @@ OUTER: // Iterate on the offset table. newSameRngs = newSameRngs[:0] + Iter: for d.Err() == nil { // Posting format entry is as follows: // │ ┌────────────────────────────────────────┐ │ @@ -923,7 +923,7 @@ OUTER: // We want to limit this loop within e.offsets[i, i+1). So when the wanted value // is >= e.offsets[i+1], go out of the loop and binary search again. if wantedValue >= e.offsets[i+1].value { - continue OUTER + break Iter } } }