-
Notifications
You must be signed in to change notification settings - Fork 22
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 file snapshot #37
Conversation
934dcc0
to
f5ee779
Compare
Signed-off-by: dierbei <[email protected]>
f5ee779
to
841fab0
Compare
I implemented a timed way to create snapshots (which will be in the same directory as the Lines 150 to 170 in 841fab0
I've modified the function parameters to customize an implementation (without passing in it will use the self-contained one) Lines 139 to 144 in 841fab0
Determine whether to create a snapshot here((follower, leader)): Lines 318 to 338 in 841fab0
Here the full amount of data is sent to the newly joined node: Lines 1032 to 1049 in 841fab0
|
This is looking very cool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was great work!
The process was rushed with one write-up, sorry; please review it for me, thanks.
I decided to remove the original
log
field, my idea was to just make sure that thestate_machine
data is complete, which has the advantage of saving memory(storing both thelog
and thestate_machine
would be two copies of the data), I didn't think about whether there would be a problem at the moment.I added timed snapshots, maybe 1 minute, 5 minutes, ....
After the snapshot is created, clear the data in memory, in order to save memory.
I haven't figured out where to put
need_create_snapshot
andcreate_snapshot
yet, wait for me some time, it's rather rushed;