Skip to content

Commit

Permalink
Removing the dropAll, since Prepare does the DropAll operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Wang authored and dna2github committed Jul 19, 2019
1 parent 8fe3a3b commit 24916cf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions worker/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ func (n *node) populateSnapshot(snap pb.Snapshot, pl *conn.Pool) (int, error) {

var writer badgerWriter
if snap.SinceTs == 0 {
// Before we write anything, we should drop all the data stored in ps.
if err := pstore.DropAll(); err != nil {
return 0, err
}
sw := pstore.NewStreamWriter()
if err := sw.Prepare(); err != nil {
return 0, err
Expand Down

0 comments on commit 24916cf

Please sign in to comment.