Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Limit number of series in Head #617

Closed
wants to merge 1 commit into from

Conversation

codesome
Copy link
Contributor

By default, there is no limit.

We need this in cortexproject/cortex#1427, but this limit might also help in other use cases.

TODO:

  • Handle returning of nil series from getOrCreateWithID(...).

/cc @tomwilkie

Signed-off-by: Ganesh Vernekar <[email protected]>
@brian-brazil
Copy link
Contributor

I suspect this will panic when this is hit, which is basically the correct action for such a limit - I don't think this makes sense for Prometheus as all we can do without panicing is stop all scraping and rule evaluations which isn't very useful. This also doesn't consider GC.

@krasi-georgiev
Copy link
Contributor

@codesome can you explain what is the use case as the Cortex PR is quite large and don't want to read through all code changes there.

@codesome
Copy link
Contributor Author

@krasi-georgiev Cortex can limit the number of series, so while trying to use prometheus tsdb in cortex, we wanted some similar functionality.

On some more thought, this limit might not be needed in tsdb. I will revisit this later if this has some good use-case for Prometheus.

@codesome codesome closed this Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants