Skip to content

Ensure ingester's TSDB Compact() is called after WAL replay #2869

@pracucci

Description

@pracucci

When running the Cortex blocks storage, at ingester startup we do replay the WAL for any tenant's TSDB found in the local filesystem and, once done, the ingester switches to READY and start receiving samples from distributors.

There are scenarios where an ingester's TSDB may have a compactable HEAD right after the WAL replay but the HEAD is not compacted before the ingester switches to READY, because it just gets compacted after 1 minute as effect of the internal ticker used by compactionLoop().

I propose to ensure that the ingester compacts the HEAD (if compactable) after the WAL replay and *before switching to READY.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions