Error in Lightning Restore

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

Original topic: lightning还原报错

| username: TheRedOne

[TiDB Version]
All versions are 5.2.4

[Encountered Problem: Phenomenon and Impact]
Using dumpling for backup, the backup was successful. However, when using lightning for restoration, an error occurred during the restoration.

Partial configuration of lightning as shown in the picture


Complete lightning log as follows
lightning_10.220.62.25_20230901.log (1.7 MB)

| username: TiDB_C罗 | Original post link

Take a look at the logs of the successful backup.

| username: WalterWj | Original post link

Check the content at position d.

| username: TheRedOne | Original post link

Do you still need the previous part?

| username: TheRedOne | Original post link

Green label: go to position 77964956

| username: TheRedOne | Original post link

The error table can be found in the backup log.

| username: TiDB_C罗 | Original post link

These two dumpling warnings correspond to lightning errors, check for no data written in the table.

| username: TiDB_C罗 | Original post link

Check this out: TiDB might OOM if dumpling without --params "tidb_enable_chunk_rpc=0" · Issue #31981 · pingcap/tidb · GitHub

| username: cassblanca | Original post link

The lighting execution machine cannot access PD.

| username: TheRedOne | Original post link

Currently using
–params “tidb_force_priority=LOW_PRIORITY,tidb_distsql_scan_concurrency=10”
Do I need to add tidb_enable_chunk_rpc=0 for it to work?

| username: TheRedOne | Original post link

It seems like it is possible.

| username: TheRedOne | Original post link

If there was an issue, why did it report success in the end? Doesn’t this mean that the backup actually failed?

| username: redgame | Original post link

There seems to be a problem with the backup.

| username: TiDB_C罗 | Original post link

Try backing up that table separately, or recreate the problematic one, then insert the data into the new table and try exporting again.

| username: TheRedOne | Original post link

If you back up this table separately, does that mean you need to restore it twice?

| username: TheRedOne | Original post link

Please help take a look at this issue again.

| username: WalterWj | Original post link

Your error is due to an issue at the end of the file. The offset indicates the position, so check if there’s a problem at the corresponding position.

| username: TheRedOne | Original post link

The screenshot corresponding to the position has been provided above, and it seems to be fine.

| username: WalterWj | Original post link

Try importing this file separately and debug it.

| username: TheRedOne | Original post link

Got it, there is an issue with the configuration file…
After upgrading the version, the configuration file no longer matches the version…