Skip to content

tsdb: remove chunk pool from memSeries#11280

Merged
codesome merged 1 commit intoprometheus:mainfrom
bboreham:pool-in-head
Sep 15, 2022
Merged

tsdb: remove chunk pool from memSeries#11280
codesome merged 1 commit intoprometheus:mainfrom
bboreham:pool-in-head

Conversation

@bboreham
Copy link
Member

@bboreham bboreham commented Sep 7, 2022

The chunk pool belongs to the head not to the series. Pass it down where required, and remove the copy of the pointer that memSeries was holding.

Since there can be millions of memSeries structs (one for each timeseries in memory), it should not carry stuff it doesn't need.

safeChunk also needs to hold a reference to the pool, because in scenarios where it is used we don't have a reference to the head. However it was already holding chunkDiskMapper for the same reason, so no big change.

The chunk pool belongs to the head not to the series. Pass it down where
required, and remove the copy of the pointer that `memSeries` was
holding.

`safeChunk` also needs to hold it, because in scenarios where it is used
we don't have a reference to the head. However it was already holding
`chunkDiskMapper` for the same reason, so no big change.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
@codesome codesome merged commit d2701be into prometheus:main Sep 15, 2022
@bboreham bboreham mentioned this pull request Oct 1, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants