Tidb-lightning Import Error: Fetch Table Columns Failed with No Retry

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tidb-lightning导入报错fetch table columns failed with no retry

| username: TiDBer_spike

【TiDB Usage Environment】Production
【TiDB Version】v6.1
【Encountered Problem】
【Reproduction Path】
Currently executing data import to TiDB 6.1
【Problem Phenomenon and Impact】

  1. Error during import process: Error 1105: message: “raft entry is too large, region 90791752, entry size 8960540” raft_entry_too_large
  2. Based on community posts, attempted to modify raftstore.raft-entry-max-size configuration to 128M and reloaded the TiKV nodes;
  3. Re-ran lightning, encountered error “fetch table columns failed: sql: Scan error on column index 3, name "NEXT_GLOBAL_ROW_ID": converting driver.Value type uint8 ("12844501496393138768") to a int64: value out of range”], this error occurs at the start of the re-run and cannot be skipped.

How should I handle this, teacher?

| username: TiDBer_spike | Original post link

During the reload of TiKV, there was an error indicating that the TiKV node took more than 2 minutes to start. Checking the cluster status showed “Disconnected,” but after a few seconds, the status returned to normal.

| username: hey-hoho | Original post link

tidb:
    performance.txn-entry-size-limit: 12582912
tikv:
    raftstore.raft-entry-max-size: '16MB'

Try adjusting like this and reload the TiDB and TiKV nodes.

| username: TiDBer_spike | Original post link

After adjusting and reloading TiDB and TiKV, the error still occurs:
[ERROR] [main.go:103] [“tidb lightning encountered error stack info”] [error=“fetch table columns failed: sql: Scan error on column index 3, name "NEXT_GLOBAL_ROW_ID": converting driver.Value type uint8 ("12844501496393138768") to a int64: value out of range”]

| username: hey-hoho | Original post link

From the error message, it appears that the field value “12844501496393138768” for NEXT_GLOBAL_ROW_ID exceeds the maximum value for int64. Try changing the field type to an unsigned bigint.

| username: TiDBer_spike | Original post link

From the error message, it is not clear which table’s field it is, and it is not a business table’s field either.

| username: hey-hoho | Original post link

Which version of Lightning are you using?

| username: TiDBer_spike | Original post link

v6.1.0