mutiple lightning parall import failed for Table 'lightning_metadata.task_meta' doesn't exist
- 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
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