TiFlash Error: Cannot find related database_id and logical_table_id from table_id_map, sync table schema failed

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

Original topic: tiflash 报错Can not find related database_id and logical_table_id from table_id_map, sync table schema fail

| username: foxchan

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.5.1
Cluster enabled with tidb_enforce_mpp=ON

After adding the TiFlash node, the error log is as follows:
Msg:2024/04/29 18:14:11.143 +08:00] [ERROR] [TiDBSchemaSyncer.cpp:283] [Cannot find related database_id and logical_table_id from table_id_map, sync table schema fail. physical_table_id=2079703] [source=keyspace=4294967295] [thread_id=194
Path:/ssddata/tiflash/logs/server.log
Msg:2024/04/29 18:14:11.143 +08:00] [ERROR] [TiDBSchemaSyncer.cpp:283] [Cannot find related database_id and logical_table_id from table_id_map, sync table schema fail. physical_table_id=2079703] [source=keyspace=4294967295] [thread_id=194
Path:/ssddata/tiflash/logs/error.log
Msg:2024/04/29 18:12:53.438 +08:00] [ERROR] [TiDBSchemaSyncer.cpp:283] [Cannot find related database_id and logical_table_id from table_id_map, sync table schema fail.

How to find the problematic table, using the following SQL does not find the problematic table name:
SELECT * FROM INFORMATION_SCHEMA.tables WHERE tidb_table_id LIKE ‘2104268%’

| username: tidb菜鸟一只 | Original post link

Can’t find either?

| username: Jack-li | Original post link

Could it be that the table was deleted or renamed?

| username: foxchan | Original post link

There is only scheduled truncation, and now it has been running for a few days without any errors.

| username: WalterWj | Original post link

When I read your description, it feels like a bug…

| username: WalterWj | Original post link

Does it not affect usage?

| username: solotzg-PingCAP | Original post link

Could you please confirm if the issue can be consistently reproduced now? Is there any way to provide the TiFlash logs before and after the initial error to facilitate troubleshooting?

| username: foxchan | Original post link

Difficult to reproduce
tiflash-proxy.log.gz (2.0 MB)
tiflash-error.log.gz (433.6 KB)

| username: solotzg-PingCAP | Original post link

Is everything back to normal now?

| username: solotzg-PingCAP | Original post link

Based on the error, it might be related to After upgrade from 5.4 to 7.5, my TiFlash data gone after the TiKV node disconnected · Issue #8777 · pingcap/tiflash · GitHub. The relevant fix has already been included in version 7.5.1. If it can eventually recover and does not affect normal queries, then it is as expected.

| username: foxchan | Original post link

It has now been restored, but the cluster itself is 7.5.1. There is no impact on the query.