Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Purge $deleted #130

@damianh

Description

@damianh

When a message or stream is deleted, a message is deleted to the $deleted stream. The primary purpose of this is to allow subscribers or (a future) mirroring capability to handle that. The current design retains these deleted messages indefinitely where as for most cases, one would only want to retain the for a period of time.

Throwing out some thoughts:

  1. Leverage the metadata infra to be able to set a maxAge and/or maxLength. Currently, the API does not allow direct manipulation of streams whose Id starts with $ by design. I'd like to keep this in place so this approach would require an explicit API. The potential slight problem is that for maxAge the purge happens on read so a ReadAllStreamForwards(null...) would be required to actually remove the $deleted stream messages. If that never happens... MaxCount is handled on append, so that is not a concern.

  2. Expose a specific operation such as PurgeDeleted(TimeSpan olderThan) that the host application can invoke on it's own schedule. Should this have it's own implementation or underneath just reads the $deleted stream and let the MaxAge purge do it's thing?

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