pingcap / pingcap/tidb

multi analyze table run when lightning parallel import one table

Open
#50,490 3 comments 0 reactions 1 assignee Claimed by @lyzx2001 View on GitHub
affects-8.1 affects-8.5 component/lightning may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 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)
1. Use 10 lightning to import CSV data for a table using physical mode in parallel mode, with configuration: checksum = false and analyze = true
```
[post-restore]
checksum = false
analyze = true
```

### 2. What did you expect to see? (Required)
When import finishes, only one analyze table should run, as there is only one table.

### 3. What did you see instead (Required)
There are 10 analyze table jobs running.

### 4. What is your TiDB version? (Required)
```
[root@lightning-0 /]# /tidb-lightning -V
Release Version: v7.6.0
Git Commit Hash: 42960c3352d165810c79852b85ada448a68efa4c
Git Branch: heads/refs/tags/v7.6.0
Go Version: go1.21.5
UTC Build Time: 2024-01-15 11:28:48
Race Enabled: false

```

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.