lightning will panic when ctrl-C
- 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)
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
```
^Cpanic: send on closed channel
goroutine 1262 [running]:
github.com/pingcap/tidb/br/pkg/lightning/importer.(*Controller).saveStatusCheckpoint(0xc000f09520, {0x52a2b68, 0xc01ca739f0}, {0xc001553500, 0x13}, 0x0, {0x0?, 0x0}, 0x78)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/importer/import.go:1041 +0x9b9
github.com/pingcap/tidb/br/pkg/lightning/importer.(*TableImporter).importKV(0xc00182b680, {0x52a2b68, 0xc01ca739f0}, 0xc002d7a630, 0xc000f09520)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/importer/table_import.go:1161 +0x24e
github.com/pingcap/tidb/br/pkg/lightning/importer.(*TableImporter).importEngine(0xc000c44810?, {0x52a2b68?, 0xc01ca739f0}, 0x0?, 0xc000f09520, 0x0?)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/importer/table_import.go:834 +0x45
github.com/pingcap/tidb/br/pkg/lightning/importer.(*TableImporter).importEngines.func3(0x0?, 0x0, 0xc000bd9480)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/importer/table_import.go:450 +0x2d3
created by github.com/pingcap/tidb/br/pkg/lightning/importer.(*TableImporter).importEngines
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/lightning/importer/table_import.go:441 +0x98a
```
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.