pingcap / pingcap/tidb

mutiple lightning parall import failed for Table 'lightning_metadata.task_meta' doesn't exist

Open
#39,961 6 comments 0 reactions 0 assignees View on GitHub
affects-6.6 affects-7.0 affects-7.1 affects-8.1 affects-8.5 component/lightning may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 severity/major type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

mutiple lightnings parally import a big table and one failed the error as follows:
```
[2022/12/15 13:45:05.085 +08:00] [ERROR] [table_restore.go:352] ["import whole table failed"] [table=`sysbench`.`sbtest1`] [takeTime=58m25.400698161s] [error="check tasks exclusively failed: fetch task metas failed: Error 1146 (42S02): Table 'lightning_metadata.task_meta' doesn't exist"]
[2022/12/15 13:45:05.085 +08:00] [ERROR] [restore.go:1576] ["restore table failed"] [table=`sysbench`.`sbtest1`] [takeTime=58m25.415093818s] [error="[Lightning:Restore:ErrRestoreTable]restore table `sysbench`.`sbtest1` failed: check tasks exclusively failed: fetch task metas failed: Error 1146 (42S02): Table 'lightning_metadata.task_meta' doesn't exist"]
[2022/12/15 13:45:05.086 +08:00] [WARN] [util.go:183] ["check and finish schedulers failed with no retry"] [retryCnt=0] [error="fetch task meta failed: Error 1146 (42S02): Table 'lightning_metadata.task_meta' doesn't exist"]
```
### 2. What did you expect to see? (Required)

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

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

master

Contributor guide

Open the contributing guide

Research direction

Start with the reported call sites in table_restore.go:352, restore.go:1576, and util.go:183, then trace how parallel table imports create or fetch lightning_metadata.task_meta. Reproduce the failure with multiple Lightning imports and verify that the task metadata table remains available throughout the restore; the issue does not specify expected behavior beyond avoiding the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.