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

How to force a snapshot? #354

Closed
kishorekrd opened this issue May 10, 2022 · 2 comments
Closed

How to force a snapshot? #354

kishorekrd opened this issue May 10, 2022 · 2 comments
Labels
todo-backlog An issue to be addressed in the future

Comments

@kishorekrd
Copy link

Currently snapshot will be taken at the configured snapshot distance. How can force a snapshot at will?
creatsnapshot() requires snapshot "s". How to get this?
void create_snapshot(snapshot& s, async_result::handler_type& when_done)

@greensky00
Copy link
Contributor

Hi @kishorekrd

Currently, there is no way to create a snapshot at will. Your state machine can create snapshots anytime though, but those non-regular ones won't be used by NuRaft. It will be useful if there is an API like raft_server::create_snapshot(uint64_t log_idx). I will put it into the backlog.

@greensky00 greensky00 added the todo-backlog An issue to be addressed in the future label May 16, 2022
@kishorekrd
Copy link
Author

I kind of solved it by setting snapshot distance to 1 and add my logic to chk_create_snapshot() to take decision on the snapshot at will. But API should be good. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo-backlog An issue to be addressed in the future
Projects
None yet
Development

No branches or pull requests

2 participants