Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KV PurgeDeletes should keep "recent" markers #96

Open
6 of 11 tasks
kozlovic opened this issue Feb 15, 2022 · 0 comments
Open
6 of 11 tasks

KV PurgeDeletes should keep "recent" markers #96

kozlovic opened this issue Feb 15, 2022 · 0 comments
Assignees
Labels
client Client related work enhancement New feature or request

Comments

@kozlovic
Copy link
Member

kozlovic commented Feb 15, 2022

Overview

For libraries that provide the maintenance function PurgeDeletes(), this should be enhanced to follow this algorithm:

  • Create a "watcher all" (subject is ">")
  • Iterate through entries, if entry is a DEL or PURGE, add this entry to a list
  • After getting the last entry, for through the list of "delete markers". If the marker is older than a certain threshold (default 30 minutes), then purge the stream by subject. If the marker is recent, purge the stream by subject, but add the "Keep:1" to the stream purge request, so that we keep the marker.

There is no ADR for that since PurgeDeletes() is not part of the core API.

Clients and Tools

Other Tasks

Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Client related work enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants