|
|
@@ -579,10 +579,11 @@ func (w *WAL) Save(st raftpb.HardState, ents []raftpb.Entry) error {
|
|
|
}
|
|
|
|
|
|
func (w *WAL) SaveSnapshot(e walpb.Snapshot) error {
|
|
|
+ b := pbutil.MustMarshal(&e)
|
|
|
+
|
|
|
w.mu.Lock()
|
|
|
defer w.mu.Unlock()
|
|
|
|
|
|
- b := pbutil.MustMarshal(&e)
|
|
|
rec := &walpb.Record{Type: snapshotType, Data: b}
|
|
|
if err := w.encoder.encode(rec); err != nil {
|
|
|
return err
|