You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeFSMSnapshotinterface {
// Persist should dump all necessary state to the WriteCloser 'sink',// and call sink.Close() when finished or call sink.Cancel() on error.Persist(sinkSnapshotSink)
// Release is invoked when we are finished with the snapshot.Release()
}
Granted, it's easy enough to code a Sink to make close idempotent, but is this simply a bug?
The text was updated successfully, but these errors were encountered:
otoolep
changed the title
Why does this library call Sink.Close() during Snapshotting
Why does this library call Sink.Close() during Snapshotting?
Sep 21, 2024
This library closes a Sink to which a snapshot is written, after the snapshot has been written to the Sink:
https://github.com/hashicorp/raft/blob/v1.7.1/snapshot.go#L197
Yet the Godocs imply that the FSM should call Close:
https://pkg.go.dev/github.com/hashicorp/[email protected]#FSMSnapshot
Granted, it's easy enough to code a Sink to make close idempotent, but is this simply a bug?
The text was updated successfully, but these errors were encountered: