diff --git a/fsm.go b/fsm.go index a84bde34..9d9a4534 100644 --- a/fsm.go +++ b/fsm.go @@ -34,6 +34,12 @@ type FSM interface { // Apply and Snapshot are always called from the same thread, but Apply will // be called concurrently with FSMSnapshot.Persist. This means the FSM should // be implemented to allow for concurrent updates while a snapshot is happening. + // + // Clients of this library should make no assumptions about whether a returned + // Snapshot() will actually be stored by Raft. In fact it's quite possible that + // any Snapshot returned by this call will be discarded, and that + // FSMSnapshot.Persist will never be called. Raft will always call + // FSMSnapshot.Release however. Snapshot() (FSMSnapshot, error) // Restore is used to restore an FSM from a snapshot. It is not called