Skip to content

Commit 6c6c127

Browse files
authored
gcs: fix a deadlock in gs parallel writer (pingcap#49800)
ref pingcap#48443
1 parent dc694a1 commit 6c6c127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

br/pkg/storage/gcs_extra.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (w *GCSWriter) readChunk(ch chan chunk) {
144144
select {
145145
case <-w.ctx.Done():
146146
data.cleanup()
147-
return
147+
w.err.CompareAndSwap(nil, w.ctx.Err())
148148
default:
149149
part := &xmlMPUPart{
150150
uploadBase: w.uploadBase,

0 commit comments

Comments
 (0)