tiflash 报警TiFlash_schema_error

版本: 5.2.2
业务线突然出现的,怀疑是ddl 操作,但是这些表没有tiflash 副本

监控

2 个赞

http://pd:2479/dashboard/#/search_logs/detail?id=14 找到相关错误日志:
[“SchemaSyncer: apply diff meets exception : DB::Exception: miss table id in TiKV 32724 \ stack is 0. /tiflash/tiflash(StackTrace::StackTrace()+0x16) [0x3921fd6]\ 1. /tiflash/tiflash(DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)+0x26) [0x3915e56]\ 2. /tiflash/tiflash(DB::SchemaBuilder<DB::SchemaGetter, DB::SchemaNameMapper>::applyRenameTable(std::shared_ptrTiDB::DBInfo, long)+0x176) [0x7e798e6]\ 3. /tiflash/tiflash(DB::SchemaBuilder<DB::SchemaGetter, DB::SchemaNameMapper>::applyDiff(DB::SchemaDiff const&)+0x154) [0x7e802e4]\ 4. /tiflash/tiflash(DB::TiDBSchemaSyncer::tryLoadSchemaDiffs(DB::SchemaGetter&, long, DB::Context&)+0x1e3) [0x7ae46b3]\ 5. /tiflash/tiflash(DB::TiDBSchemaSyncer::syncSchemas(DB::Context&)+0x3fa) [0x7ae51fa]\ 6. /tiflash/tiflash(DB::SchemaSyncService::syncSchemas()+0x2f) [0x7ad2f5f]\ 7. /tiflash/tiflash() [0x7ad56c1]\ 8. /tiflash/tiflash(DB::BackgroundProcessingPool::threadFunction()+0x947) [0x7991807]\ 9. /tiflash/tiflash() [0x8e571bf]\ 10. /lib64/libpthread.so.0(+0x7dd5) [0x7f1976211dd5]\ 11. /lib64/libc.so.6(clone+0x6d) [0x7f1975c38ead]\ ”] [thread_id=17]

1 个赞

具体的 DDL 操作是删除有 tiflash 部分的表?还是创建新表 ?可以详细反馈一下吗 ?我们定位一下可能的原因。

1 个赞

看截图, 三个箭头 是报警时间和监控图 对应
ddl 在第一个图 给出了, 就是 频繁的rename表

1 个赞

rename 表是有 tiflash 副本的表对吗 ?

1 个赞

这几个表 都没有设置tiflash 副本 。

1 个赞

这些表没有tiflash。
补充一个tiflash节点 日志
tiflash-server.log (6.4 MB)
这是创建表的SQL
image

1 个赞

调查了一下,这属于预期的情况。

  1. 为了维持元信息与 tidb 相同,当前版本的 tiflash 的 SchemaSyncer 会从 tidb 同步所有的 ddl,不管发生 ddl 的表是否有 tiflash 副本。

  2. 当同步 ddl 出现问题,比如本问题中表名变化频繁导致 tiflash 接收到 ddl 时无法从 tidb 获得预期的表,就会产生一个警告。

    这属于预期分支的一种,在产生警告后 tiflash 会从 tidb 全量同步一份 schema,不会影响查询正确性。

  3. 可以暂时忽略或删除这个告警,同时我们也正在整理 tiflash 监控告警项,预计会在下个版本整理完成,避免产生类似的误报。

感谢您的反馈!

2 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。