pingcap / pingcap/tidb

[ddl] Distributed ADD INDEX hangs in running/retry on persistent SetTSBeforeImportEngine engine-not-found errors

Open
#70,028 1 comment 0 reactions 1 assignee Claimed by @wjhuang2016 View on GitHub
affects-8.5 component/ddl component/DXF found-by-ai severity/critical type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

> Evidence status: confirmed.

### 1. Minimal reproduce step (Required)

On testbed 8220955 with tidb_enable_dist_task=ON and tidb_ddl_enable_fast_reorg=ON, use a commit-matched failpoint owner and inject github.com/pingcap/tidb/pkg/ingestor/ingestctrl/mockAINativeSetTSBeforeImportEngineErr=return("engine_not_found") before SetTSBeforeImportEngine on a 5k-row ADD INDEX. Baseline job 2313 synced. One-shot control job 2322 synced. Persistent fault keeps job 2319 / global task 270003 in running/write reorganization until the failpoint is removed.

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

A source-native fundamental import/setup error such as engine-not-found should fail or cleanly roll back the distributed subtask instead of being retried forever.

### 3. What did you see instead? (Required)

Lightning/ingest side logs the error as un-retryable, but the DXF task executor treats the subtask as retryable/idempotent and reruns it, leaving the DDL job running until external fault removal.

### 4. What is your TiDB version? (Required)

TiDB v9.0.0-beta.2.pre-1895-g5c9198e948 distributed ADD INDEX / DXF ingest path

Likely root cause and fix direction

backfillDistExecutor.IsRetryableError falls through to isRetryableError(err, true), so unknown/source-native runtime errors from the import path are treated as retryable. task_executor keeps the subtask in running state and reruns it forever.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.