Skip to content

Commit

Permalink
fix(worker): Flush the stream writer on error (DGRAPH-2499) (#6609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim Jarif authored Nov 10, 2020
1 parent ecace57 commit 7088c65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions worker/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func (n *node) populateSnapshot(snap pb.Snapshot, pl *conn.Pool) (int, error) {
var writer badgerWriter
if snap.SinceTs == 0 {
sw := pstore.NewStreamWriter()
defer sw.Cancel()

if err := sw.Prepare(); err != nil {
return 0, err
}
Expand Down

0 comments on commit 7088c65

Please sign in to comment.