Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: Lightning:Restore:ErrSchemaNotExists
[Test Environment for TiDB] Testing
[TiDB Version] 5.3.3
[Encountered Issue: Phenomenon and Impact] When importing data using Lightning, the tidb mode works fine, but the local mode reports the error Lightning:Restore:ErrSchemaNotExists.
[Solution] 专栏 - 探索TiDB Lightning源码来解决发现的bug | TiDB 社区 The table list of the target database is obtained through the remote method provided by each Backend. For the local mode, it actually calls the status port of TiDB to get it (port 10080 in the configuration file): curl http://{tidb-server}:10080/schema/test. To achieve balanced use of TiDB-server resources, F5 is configured, and the IP in the [tidb] connection information is filled with the load balancer’s VIP, causing the local mode to report a table not found error. You need to change the [tidb] connection information to the IP of the tidb-server or expose port 10080 for the VIP, which corresponds to port 10080 of the tidb-server.