-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tidb-lightning tidb backend import tableA but report Error 1146: Table 'tableB' doesn't exist #44614
Comments
i think the error was introduced by FetchRemoteTableModels funcation. |
The error occurs when the user utilizes the 'tidb' backend to import data. Specifically, at the start of the import process, when Lightning is creating tables, the user drops an irrelevant table in the same database as the data source. The specific reason for the error message is as follows: Next, Lightning will iterate over all the databases involved in the data to be imported before and after executing the statement to restore the corresponding table structure. Then, each database will obtain all the existing table structures to form a map. The purpose of constructing this map is to:
Therefore, the full table structure acquisition strategy is used when constructing this map, and then further filtered based on the list of tables to be imported. The user's error occurred during the stage of restoring the table structure. At that time, Lightning was constructing this map, and an error occurred when executing SHOW TABLE <table_name> NEXT_ROW_ID to obtain the row ID information of the table, which had been deleted. Lightning can consider optimizing this process. For example, when encountering this type of error, it can continue to construct the remaining map elements. Because the information in this map, minus one irrelevant table, will not affect the import. |
Bug Report
during tidb-lightning import another table dropped by someone else.
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
import successful !
3. What did you see instead (Required)
tidb-lighting report another table not exist.
4. What is your TiDB version? (Required)
tidb-lightning v6.5.2
The text was updated successfully, but these errors were encountered: