cai-jinlin commented on issue #58441: URL: https://github.com/apache/doris/issues/58441#issuecomment-3630684795
Root cause of the anomaly: When a FOLLOWER node recovers from a backup file, the "home" information of external tables (such as databases like MySQL or SQL Server) is lost. This causes the system to fail in determining which database the table belongs to during subsequent query optimization, resulting in an exception. Essentially, this is an "information loss" bug during data recovery, leading to system crashes when external tables are used in subsequent operations due to empty values. Solution: When restoring an ExternalTable from a backup, immediately locate and set the correct database reference based on the database ID in the backup. The backup file already contains the database ID, but the original code did not use this ID to find the Database object and establish the association during reading. The benefits of doing this: 1. Once set up, all subsequent users benefit. No need to write redundant code or repeatedly check if the database tables are empty. You can immediately establish a reference from the table to the database. The backup file already contains the database ID. 3. Backward compatible, does not affect normal processes, only fixes exceptional cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
