-
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
Log Snapshots #19
Comments
Understanding some of the implementations; Files, for example, will write the current LogEntry to the Snapshot file and truncate the LogEntry; Creating a new Snapshot file again will contain the contents of the first snapshot and the new LogEntry, so the file will get bigger and bigger; Will there be a better way? Thanks for sharing; |
Here is my idea so far, We want to keep a snapshot that is quick to read and verify and update while keeping it's size somewhat reasonable. Snapshot size will grow with log entries but the growth rate can be reasonably controlled in order for a node to be able keep its hardware requirements to be reasonable. My idea is as below:
Questions I have: Should the snapshot be synchronised across different nodes or not? |
My idea is that each node will have its own If the data of a |
Yes, I have thought about doing a Another idea is to take a For example: every thousand |
My current idea is to have two ways of storing it, not sure if that's feasible.
|
I like this idea a lot, one method could be to have some checkpoints based on finalized log entries, so in case a node falls behind it becomes possible for it to just request a neighbouring node for finalized data from that checkpoint from which it fell behind. Taking ideas from public blockchains I would like to implement this for the snapshots: https://dl.acm.org/doi/10.1145/3651890.3672219 I would store the snapshot as a key value pair in something like a local rocksDB instance. Where key is a monotonically increasing checkpoint id (could use a UTC timestamp) & value is actual contents of the logEntry that have been 'finalized'. The rateless invertible bloom filter would be built on the coded symbols encoding the difference between a local and remote copy of the node. Allowing for set reconciliation Essentially flow would be:
|
Sounds good, using a database would allow for incremental synchronization. I've been planning to go ahead and implement file snapshots lately, but I've been busy lately. |
The text was updated successfully, but these errors were encountered: