Skip to content

Commit

Permalink
(release/v20.07) Pause rollups during snapshot streaming. (#6611)
Browse files Browse the repository at this point in the history
(cherry picked from commit b777913)
  • Loading branch information
martinmr authored Oct 2, 2020
1 parent 1e29664 commit 0b7483f
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 @@ -253,6 +253,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 0b7483f

Please sign in to comment.