diff --git a/CHANGELOG.md b/CHANGELOG.md index 113bb0e6765..3b3e0b8070b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,7 +60,7 @@ * [BUGFIX] Querier: reduce log volume when querying ingesters with zone-awareness enabled and one or more instances in a single zone unavailable. #6381 * [BUGFIX] Querier: don't try to query further ingesters if ingester query request minimization is enabled and a query limit is reached as a result of the responses from the initial set of ingesters. #6402 * [BUGFIX] Ingester: Don't cache context cancellation error when querying. #6446 -* [BUGFIX] Ingester: don't ignore errors encountered while iterating through chunks or samples in response to a query request. #6469 +* [BUGFIX] Ingester: don't ignore errors encountered while iterating through chunks or samples in response to a query request. #6451 #6469 * [BUGFIX] All: fix issue where traces for some inter-component gRPC calls would incorrectly show the call as failing due to cancellation. #6470 ### Mixin diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index dcacd2e9b5d..27d870fcef6 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -1765,6 +1765,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() @@ -1861,6 +1866,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() @@ -2080,6 +2090,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()