`IMPORT INTO` can't be cancelled immediately and stuck at `MakeTableRegions`
- 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!
If the task need to read massive files before actually start, for example, read parquet or split large CSV in `MakeTableRegions`, this task can't be cancelled immediately.
### 1. Minimal reproduce step (Required)
Use `IMPORT INTO xxx format "parquet"` with massive files and then cancel the job.
(You can also reproduce it using a single large CSV)
### 2. What did you expect to see? (Required)
The import job should be cancelled immediately.
### 3. What did you see instead (Required)
```
mysql> cancel import job 60001;
Query OK, 0 rows affected (30 min 34.75 sec)
```
From the profile we can see that owner node is still scanning files.

### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.