Skip to content

Commit

Permalink
Pause rollups during snapshot streaming. (#6282)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Sep 30, 2020
1 parent a846471 commit b777913
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions worker/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ func doStreamSnapshot(snap *pb.Snapshot, out pb.Worker_StreamSnapshotServer) err
}

func (w *grpcWorker) StreamSnapshot(stream pb.Worker_StreamSnapshotServer) error {
// Pause rollups during snapshot streaming.
closer, err := groups().Node.startTask(opSnapshot)
if err != nil {
return err
}
defer closer.Done()

n := groups().Node
if n == nil || n.Raft() == nil {
return conn.ErrNoNode
Expand Down

0 comments on commit b777913

Please sign in to comment.