lightning: lightning doesn't check whether target table is empty (behavior changed compared to 5.0.x) #27919
Closed
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Lightning 5.0.1 added a check to ensure target table is empty before import for DBaaS.
Lightning 5.1.0 removed this check due to new feature parallel import / incremental import, this changes previous product behaviors.
Steps:
- Import a table to TiDB with lightning
- Import the table again to TiDB again with lightning
2. What did you expect to see? (Required)
Lightning behavior should be consistent for 5.0.1 and 5.1.0+.
3. What did you see instead (Required)
For lightning 5.1.0+, lightning doesn't check target table empty or not before the import, this may result in:
- Duplicate rows inserted into the table, if the import data doesn't have PK/UK
- Import failed with checksum mismatched error, if import data has PK/UK
4. What is your TiDB version? (Required)
5.2.0
Activity