Skip to content

tsdb: remove chunkRange and oooCapMax from memSeries#11288

Merged
codesome merged 3 commits intoprometheus:mainfrom
bboreham:chunkrange-in-head
Sep 27, 2022
Merged

tsdb: remove chunkRange and oooCapMax from memSeries#11288
codesome merged 3 commits intoprometheus:mainfrom
bboreham:chunkrange-in-head

Conversation

@bboreham
Copy link
Member

@bboreham bboreham commented Sep 8, 2022

chunkRange is the (oddly-named) configured duration for the head block.

We don't need a copy of this value per series. Pass it down where required, and remove the copy.

The value in Head is only updated in resetInMemoryState(), which also discards all memSeries.

Similar to #11280.

Also removed oooCapMax for similar reasons.

@codesome
Copy link
Member

I guess it is time for a rebase 👀, thanks for both the PRs!

chunkRange is the (oddly-named) configured duration for the head block.

We don't need a copy of this value per series. Pass it down where
required, and remove the copy.

The value in `Head` is only updated in `resetInMemoryState()`, which
also discards all `memSeries`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
oooCapMax is the configured maximum capacity for an out-of-order chunk.

Storing it per-series uses extra memory, and has surprising behaviour
if users change the value in config - series created before the change
will keep their old value.

Instead, pass it down where required, and remove the per-series value.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
@bboreham bboreham changed the title tsdb: remove chunkRange from memSeries tsdb: remove chunkRange and oooCapMax from memSeries Sep 22, 2022
Copy link
Member

@codesome codesome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

@codesome codesome mentioned this pull request Sep 23, 2022
8 tasks
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
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