Lightning import fails if auto_increment / auto_random column is NULL and backend is local/importer #34208
Labels
affects-6.0
component/lightning
This issue is related to Lightning of TiDB.
severity/major
type/bug
The issue is confirmed as a bug.
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
CREATE TABLE
t_auto_incr
(id
bigint PRIMARY KEY AUTO_INCREMENT,c
char(40) NOT NULL DEFAULT '');CREATE TABLE
t_auto_random
(id
bigint PRIMARY KEY AUTO_RANDOM(3),c
char(40) NOT NULL DEFAULT '');[root@centos76_vm auto_increment]# more test.t_auto_incr.1.sql
INSERT INTO
t_auto_incr
VALUES(NULL, 'HhdyJnKnnFkYMltimhLCZnzTyvHYgZKmqcsxidPV');
INSERT INTO
t_auto_incr
VALUES(NULL, 'TaCiCHTXSlpWtqdjmExJLsvWdWZvpWqFSeyQNTky');
Note: Import is OK if tidb backend is used for lightning import.
[root@centos76_vm auto_increment]# tiup tidb-lightning:v5.0.2 -config lighting.toml
Starting component
tidb-lightning
: /root/.tiup/components/tidb-lightning/v5.0.2/tidb-lightning -config lighting.tomlVerbose debug logs will be written to tidb-lightning.log
Error: checksum mismatched remote vs local => (checksum: 8717407354590535884 vs 10040980041112552038) (total_kvs: 1 vs 2) (total_bytes:63 vs 126)
tidb lightning encountered error: checksum mismatched remote vs local => (checksum: 8717407354590535884 vs 10040980041112552038) (total_kvs: 1 vs 2) (total_bytes:63 vs 126)
Error: run
/root/.tiup/components/tidb-lightning/v5.0.2/tidb-lightning
(wd:/root/.tiup/data/SawwSYl) failed: exit status 1MySQL [test]> select * from t_auto_incr;
+----+------------------------------------------+
| id | c |
+----+------------------------------------------+
| 0 | TaCiCHTXSlpWtqdjmExJLsvWdWZvpWqFSeyQNTky |
+----+------------------------------------------+
1 row in set (0.01 sec)
br: v5.0.2 and v5.1.0
Operation logs
br.log
for BR if possibletidb-lightning.log
for TiDB-Lightning if possibletikv-importer.log
from TiKV-Importer if possibleConfiguration of the cluster and the task
tidb-lightning.toml
for TiDB-Lightning if possibletikv-importer.toml
for TiKV-Importer if possibletopology.yml
if deployed by TiUPScreenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible
The text was updated successfully, but these errors were encountered: