Snaphots documentation #1398
debilausaure
started this conversation in
General
Replies: 1 comment 1 reply
-
A snapshot does not have to contain all of the data. It can be just a manifest file containing pointers to data files on disk. When transmitting a snapshot via Handling large snapshots that cannot fit in memory is a typical use case, and there should be a working example for this scenario. Unfortunately, this work has been delayed. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to implement replication in my application using
openraft
. I've read carefully about the protocol, but I'm not familiar at all with the implementation side.My storage contains sensitive data, and the idea is to serialize/deserialize data on the storage side before passing it to
openraft
, which will only process opaque data blobs.Essentially,
openraft
would receive receive write data from the storage whenever something needs to be written. It will first pass it in opaque form through awrite
API call, which will be sent as a request to other nodes and set into the log as a new entry using theappend
method from the traitRaftLogStorage
(I am aware this needs to be persisted on storage). Once the log is propagated and the entry is committed, the storage will update its actual data though theapply
method of theRaftStateMachine
trait. On that side, I think I've got a rough idea of what to implement.What I can't quite wrap my head around is how to handle snapshots. In the examples, snapshots are simply a copy of the state machine. I can't do that since my data is too large to fit in memory, but the method
build_snapshot
from theSnapshotBuilder
trait specifies that it should.Am I at a dead end here or am I missing something ?
Beta Was this translation helpful? Give feedback.
All reactions