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

Add a command to let user trigger log purge with Raft::purge_log() #852

Closed
drmingdrmer opened this issue May 23, 2023 · 1 comment · Fixed by #855
Closed

Add a command to let user trigger log purge with Raft::purge_log() #852

drmingdrmer opened this issue May 23, 2023 · 1 comment · Fixed by #855

Comments

@drmingdrmer
Copy link
Member

          > @kevlu93 Do you simply wish to specify the log index that needs to be purged manually?

And I do not know what a snapshot buffer is. Did you mean to keep the last two snapshots?

Yup exactly we want to keep the last two snapshots, so being able to specify the log index manually would be helpful if we switch to a time based snapshot triggers.

Originally posted by @kevlu93 in #823 (comment)

@github-actions
Copy link

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

This was referenced May 23, 2023
drmingdrmer added a commit to drmingdrmer/openraft that referenced this issue May 25, 2023
This method allows users to purge logs when required.
It initiates the log purge up to and including the given `upto` log index.

Logs that are not included in a snapshot will **NOT** be purged.
In such scenario it will delete as many log as possible.
The `max_in_snapshot_log_to_keep` config is not taken into account when
purging logs.

Openraft won't purge logs at once, e.g. it may be delayed by several
seconds, because if it is a leader and a replication task has been
replicating the logs to a follower, the logs can't be purged until the
replication task is finished.

- Fix: databendlabs#852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant