Skip to content

Commit 04b2c22

Browse files
committed
restore: fix restore hanging on server stop
`RunTaskAsyncEx` returns an error if it is ran while the stopper is [stopping or quiescing](https://github.com/cockroachdb/cockroach/blob/52aaf2e7ea3f20aced87d1dcc87a1873fb87ffbe/pkg/util/stop/stopper.go#L498-L500). In the generative split and scatterer processor, in the event that the task is run during stopping/quiesce, the `doneScatterCh` is never closed. That means that any follow up `Next` calls on the processor will hang on receiving from the channel. Fixes: #153806 Release note: None
1 parent f498390 commit 04b2c22

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/backup/generative_split_and_scatter_processor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ func (gssp *generativeSplitAndScatterProcessor) Start(ctx context.Context) {
367367
}); err != nil {
368368
gssp.scatterErr = err
369369
cancel()
370+
close(gssp.doneScatterCh)
370371
close(workerDone)
371372
}
372373
}

0 commit comments

Comments
 (0)