Skip to content

Commit

Permalink
Don't retain labels longer than needed
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed Nov 15, 2024
1 parent 51bc370 commit 3fcf6c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/querier/block_streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ func (bqss *blockStreamingQuerierSeriesSet) Next() bool {
}

bqss.currSeries = newBlockStreamingQuerierSeries(currLabels, seriesIdxStart, bqss.nextSeriesIndex-1, bqss.streamReader, bqss.chunkInfo, bqss.nextSeriesIndex >= len(bqss.series), bqss.remoteAddress)

// Clear any labels we no longer need, to allow them to be garbage collected when they're no longer needed elsewhere.
clear(bqss.series[seriesIdxStart : bqss.nextSeriesIndex-1])

return true
}

Expand Down

0 comments on commit 3fcf6c1

Please sign in to comment.