Skip to content

Blocks should never be deleted by ingester's TSDB retention until shipped to the storage #2868

@pracucci

Description

@pracucci

When running Cortex blocks storage, the TSDB retention in the ingester is configured to -experimental.tsdb.retention-period. TSDB will then delete any block whose MaxTime is older then that, regardless the block has been successfully shipped to the storage (TSDB has no meaning of the shipper).

There are at least two scenarios where this could happen:

  1. Ingester is failing to upload blocks to the storage (eg. auth issue, networking issue, ...)
  2. Ingester's TSDB Head compaction is failing (eg. due to an in-memory corruption), ingester is restarted after several hours (more than retention-period), WAL gets replayed, blocks compacted but they're immediately deleted by retention, before they're successfully uploaded to the storage

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