Skip to content

Return a panic error when other TiDBs exit earlier than the owner #41208

Closed
@zimulala

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. When adding the index distributed, a non-owner node experiences an error when processing the backfill job, reports the error in advance (e.g. duplicated key).
  2. The owner node finds this operation error message when checking task completion, and returns the error directly.
  3. But the owner node processing backfill job has not yet quit.

2. What did you expect to see? (Required)

No panic in the recoverable goroutine.

3. What did you see instead (Required)

github.com/pingcap/tidb/util.Recover
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/misc.go:120
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:884
runtime.panicmem
	/usr/local/go/src/runtime/panic.go:260
runtime.sigpanic
	/usr/local/go/src/runtime/signal_unix.go:835
github.com/pingcap/tidb/ddl.(*reorgCtx).isReorgCanceled
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/reorg.go:109
github.com/pingcap/tidb/ddl.(*ddlCtx).isReorgRunnable
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/reorg.go:347
github.com/pingcap/tidb/ddl.(*backfillWorker).handleBackfillTask
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/backfilling.go:374
github.com/pingcap/tidb/ddl.(*backfillWorker).runTask
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/backfilling.go:463
github.com/pingcap/tidb/ddl.runBackfillJobs.func1
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/ddl/dist_backfilling.go:134
github.com/pingcap/tidb/util/gpool/spmc.(*goWorker[...]).run.func1
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/gpool/spmc/worker.go:72

4. What is your TiDB version? (Required)

master

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions