Skip to content

Commit

Permalink
Un-revert #6451 (#6780)
Browse files Browse the repository at this point in the history
* Revert "Revert "Check for errors when iterating through chunks or samples in response to a query (#6451)" (#6576)"

This reverts commit ad50cda.

* Update CHANGELOG.md
  • Loading branch information
charleskorn authored Nov 30, 2023
1 parent 3b55ef5 commit 886b1d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

* [CHANGE] Ingester: Increase default value of `-blocks-storage.tsdb.head-postings-for-matchers-cache-max-bytes` and `-blocks-storage.tsdb.block-postings-for-matchers-cache-max-bytes` to 100 MiB (previous default value was 10 MiB). #6764
* [ENHANCEMENT] PromQL: ignore small errors for bucketQuantile #6766
* [BUGFIX] Ingester: don't ignore errors encountered while iterating through chunks or samples in response to a query request. #6451
* [BUGFIX] Fix issue where queries can fail or omit OOO samples if OOO head compaction occurs between creating a querier and reading chunks #6766
* [BUGFIX] Fix issue where concatenatingChunkIterator can obscure errors #6766
* [BUGFIX] Fix panic during tsdb Commit #6766
Expand Down
14 changes: 14 additions & 0 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,11 @@ func (i *Ingester) executeSamplesQuery(ctx context.Context, db *userTSDB, from,
return 0, 0, fmt.Errorf("unsupported value type: %v", valType)
}
}

if err := it.Err(); err != nil {
return 0, 0, err
}

numSamples += len(ts.Samples) + len(ts.Histograms)
numSeries++
tsSize := ts.Size()
Expand Down Expand Up @@ -1895,6 +1900,11 @@ func (i *Ingester) executeChunksQuery(ctx context.Context, db *userTSDB, from, t
ts.Chunks = append(ts.Chunks, ch)
numSamples += meta.Chunk.NumSamples()
}

if err := it.Err(); err != nil {
return 0, 0, err
}

numSeries++
tsSize := ts.Size()

Expand Down Expand Up @@ -2114,6 +2124,10 @@ func (i *Ingester) sendStreamingQueryChunks(allSeries *chunkSeriesNode, stream c
numSamples += meta.Chunk.NumSamples()
}

if err := it.Err(); err != nil {
return 0, 0, 0, err
}

numChunks += len(seriesChunks.Chunks)
msgSize := seriesChunks.Size()

Expand Down

0 comments on commit 886b1d1

Please sign in to comment.