Skip to content

Ingester: compactHead should also compact OOOHead #6107

Closed
@yeya24

Description

@yeya24

Describe the bug
We have a tenant with out of order ingestion enabled. One day, the tenant stopped ingestion completely. However, its active series count still remain > 0 and it never went down even though there is no ingestion at all.

Expected behavior
When a TSDB becomes idle, Cortex Ingester will force a head compaction after a configured idle timeout. This should clean up the active series in memory.

I think the issue is that in Ingester compactHead function, Ingester uses TSDB CompactHead to perform head compaction. When out of order is enabled, there is a new function introduced called CompactOOOHead which specifically compacts the head for out of order samples and write behind log (WAL for OOO data). We should extend Ingester to also call CompactOOOHead to flush OOO data from memory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions