MCPcopy
hub / github.com/pingcap/tidb / TaskMayPanic

Interface TaskMayPanic

pkg/resourcemanager/pool/workerpool/workerpool.go:74–79  ·  view source on GitHub ↗

TaskMayPanic is a type to remind the developer that need to handle panic in the task.

Source from the content-addressed store, hash-verified

72// TaskMayPanic is a type to remind the developer that need to handle panic in
73// the task.
74type TaskMayPanic interface {
75 // RecoverArgs returns the argument for pkg/util.Recover function of this task.
76 // The error returned is which will be passed to upper level, if not provided,
77 // we will use the default error.
78 RecoverArgs() (metricsLabel string, funcInfo string, err error)
79}
80
81// Worker is worker interface.
82type Worker[T TaskMayPanic, R any] interface {

Callers 1

handleTaskWithRecoverMethod · 0.65

Implementers 6

importStepMinimalTaskpkg/disttask/importinto/proto.go
checkIndexTaskpkg/executor/check_table_index.go
TableScanTaskpkg/ddl/backfilling_operators.go
IndexRecordChunkpkg/ddl/backfilling_operators.go
regionJobpkg/lightning/backend/local/region_job
mergeMinimalTaskpkg/lightning/backend/external/merge.g

Calls

no outgoing calls

Tested by

no test coverage detected