Replies: 1 comment 1 reply
-
|
the files with the date appended, are just archives, you can delete them anytime |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
If running for some time I think it would be nice to automatically remove old snapshot files.
In the RAFT.md documentation I see;
"Regardless of the compaction method chosen, the old snapshot file is always being backed up by appending a suffix to the name of the old snapshot file and no files are being automatically deleted from the current log.
If you really need to delete the files, do this on your own accord."
So what I did was to copy the listPruneFiles function used in zr-log-compact.js and adapt it for my code.
My tests are simple. I'm currently testing by creating new log entries every x seconds and then create a snapshot after a certain number of logs. I am using a three-node cluster (of course) on the local machine.
This is what the directories and files under the .raft folder look like after some testing;
Since the tests are simple, there are only always one file under the log directory for the first (id1) node.
However, for each snapshot created, a unique file is also created one level up from the log directory for the node, where each file have a date and a unique number attached to the name.
The listPruneFiles never shows any prunable files, prtobabyl because none of the edge-cases ever happen in my simple test, but I get a bit worried over these additional snapshot file which I feel might be a bigger problem over time.
My question is - what are these additional date-number snap files?
Can I delete them, and if so under which conditions?
BR,
PS
Beta Was this translation helpful? Give feedback.
All reactions