Skip to content

Commit 5134873

Browse files
committed
jobs: mark context.Canceled as retryable
Release note: none. Epic: none.
1 parent e6668da commit 5134873

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/jobs/joberror/errors.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
package joberror
77

88
import (
9+
"context"
10+
911
"github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord"
1012
"github.com/cockroachdb/cockroach/pkg/sql/flowinfra"
1113
"github.com/cockroachdb/cockroach/pkg/sql/sqlerrors"
@@ -32,5 +34,6 @@ func IsPermanentBulkJobError(err error) bool {
3234
!errors.Is(err, circuit.ErrBreakerOpen) &&
3335
!sysutil.IsErrConnectionReset(err) &&
3436
!sysutil.IsErrConnectionRefused(err) &&
35-
!errors.Is(err, sqlinstance.NonExistentInstanceError)
37+
!errors.Is(err, sqlinstance.NonExistentInstanceError) &&
38+
!errors.Is(err, context.Canceled)
3639
}

0 commit comments

Comments
 (0)