Skip to content

Lightning: Table Empty Check Cannot Find Imported Dirty Data on Previous Failed Imports #39477

@dsdashun

Description

@dsdashun

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Import the data using Lightning, and halt it half-way during importing the data records, but before importing any indices .
  2. Import the data a second time.

2. What did you expect to see? (Required)

The second import should not be allowed (if check-requirements is turned on ), because the table has actually imported some record data in the previous import.

3. What did you see instead (Required)

  • The second import can be executed successfully
  • If checking the record count, we can find inconsistencies on these two statements:
SELECT COUNT(*) FROM t;
SELECT COUNT(*) FROM t USE INDEX();

Seems the dirty data is still inside the table, and it cannot be cleared unless dropping the table and re-import again.

4. What is your TiDB version? (Required)

Latest master version

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.component/lightningThis issue is related to Lightning of TiDB.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions