【 TiDB 使用环境】生产环境
【 TiDB 版本】7.2
【复现路径】
【遇到的问题:问题现象及影响】生产系统中,这个业务表的自增主键达到6万亿条,发现tikv->tiflash同步经常挂掉
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】
show create table event_analyze \G;
*************************** 1. row ***************************
Table: event_analyze
Create Table: CREATE TABLE event_analyze
(
id
bigint(20) NOT NULL AUTO_INCREMENT,
title
varchar(255) DEFAULT NULL COMMENT ‘标题’,
KEY province_index
(province
),
KEY number_index
(number
),
KEY commandId_index
(commandId
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=6666675293967 COMMENT=‘事件分析主表’
1 row in set (0.00 sec)
报错如下
[2023/08/30 09:55:19.453 +08:00] [ERROR] [Exception.cpp:90] ["Code: 49, e.displayText() = DB::Exception: Check compare(range.getEnd(), ext_file.range.getEnd()) >= 0 failed, range.toDebugString() = [6666664934914,6666664941665), ext_file.range.toDebugString() = [6666664934914,6666664941666), e.what() = DB::Exception, Stack trace:\n\n\n 0x1bfe42e\tDB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int) [tiflash+29353006]\n \tdbms/src/Common/Exception.h:46\n 0x73a0bde\tDB::DM::DeltaMergeStore::ingestFiles(std::__1::shared_ptrDB::DM::DMContext const&, DB::DM::RowKeyRange const&, std::__1::vector<DB::DM::ExternalDTFileInfo, std::__1::allocatorDB::DM::ExternalDTFileInfo > const&, bool) [tiflash+121244638]\n \tdbms/src/Storages/DeltaMerge/DeltaMergeStore_Ingest.cpp:564\n 0x7e63fe4\tDB::DM::DeltaMergeStore::ingestFiles(DB::Context const&, DB::Settings const&, DB::DM::RowKeyRange const&, std::__1::vector<DB::DM::ExternalDTFileInfo, std::_1::allocatorDB::DM::ExternalDTFileInfo > const&, bool) [tiflash+132530148]\n \tdbms/src/Storages/DeltaMerge/DeltaMergeStore.h:305\n 0x7f119d9\tvoid DB::KVStore::checkAndApplyPreHandledSnapshotDB::RegionPtrWithSnapshotFiles(DB::RegionPtrWithSnapshotFiles const&, DB::TMTContext&) [tiflash+133241305]\n \tdbms/src/Storages/Transaction/ApplySnapshot.cpp:139\n 0x7f10166\tvoid DB::KVStore::applyPreHandledSnapshotDB::RegionPtrWithSnapshotFiles(DB::RegionPtrWithSnapshotFiles const&, DB::TMTContext&) [tiflash+133235046]\n \tdbms/src/Storages/Transaction/ApplySnapshot.cpp:426\n 0x7f87eb1\tApplyPreHandledSnapshot [tiflash+133725873]\n \tdbms/src/Storages/Transaction/ProxyFFI.cpp:664\n 0x7f3d2289a09f\t$LT$engine_store_ffi…observer…TiFlashObserver$LT$T$C$ER$GT$$u20$as$u20$raftstore…coprocessor…ApplySnapshotObserver$GT$::post_apply_snapshot::h9cf73b076a6be5ca [libtiflash_proxy.so+24293535]\n 0x7