Open
Description
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
type FSMSnapshot interface {
// Persist should dump all necessary state to the WriteCloser 'sink',
// and call sink.Close() when finished or call sink.Cancel() on error.
Persist(sink SnapshotSink)
// 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?
Metadata
Assignees
Labels
No labels
Activity