Skip to content

dynostore: policy deletion and compaction support #649

Description

@shortishly

Does it make sense to apply the cleanup.policy to dynostore (S3, memory/etc) based storage engines?

Yes, it makes sense to apply cleanup.policy (delete/compact) to dynostore-based backends like S3.

Tansu aims to be a drop in replacement for Apache Kafka. In Kafka, cleanup.policy is a core topic configuration that works regardless of the underlying storage (log segments on disk). Users expect the same behavior when they set cleanup.policy=delete or compact (or both) on a topic; especially for S3-backed setups, which are often used for cost-effective, long-term or high-volume storage.

One additional suggestion I want to add is in the docs to make this clear explicitly; during the time it is being built. It took me a issue search to figure this out; that the above support is not fully ready. Without this; I see that people using the S3 engine (or S3 compatible ones) will configure topics with retention and compaction policies; expecting it to work. Without enforcement, data will just keep accumulating in S3.

SQL engines (Postgres, SQLite) already implement this via maintenance operations (compaction via CTEs keeping latest offset per key, deletion via timestamp). Applying similar logic to dynostore keeps the behavior uniform and avoids surprises when switching storage engines.

Originally posted by @ErSauravAdhikari in #464

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions