Skip to content

storage: escape hatch to ignore timestamps in future during retention #9820

@jcsp

Description

@jcsp

This is separate to a more structured change to record server timestamps in segments so that retention can be done reliably by server time rather than client time. That requires a format change, this ticket is for a backportable hack.

If a user has written timestamps into Redpanda that are far in the future, these can prevent collection of old data on retention.ms topics indefinitely.

To provide a way out of this situation, we may add an off-by-default configuration property that changes the retention behavior to ignore timestamps in the future (relative to the server's local time), and instead look elsewhere for a usable timestamp:

  • If any other timestamp in a segment's index is not in the future, then use this.
  • If all the timestamps available are in the future, then fall back to using the mtime of the segment file

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions