【 Bug 的影响】
tiflash 无法启动
【可能的问题复现步骤】
修改表字段类型
无符号 unsigned int(11)改成有有符号int(11)
【看到的非预期行为】
tiflash无限报错,无法启动
【期望看到的行为】
正常启动
【相关组件及具体版本】
v5.2.0
tiflash日志
[2021/09/09 14:29:06.964 +08:00] [ERROR] [<unknown>] ["DB::EngineStoreApplyRes DB::HandleWriteRaftCmd(const DB::EngineStoreServerWrap*, DB::WriteCmdsView, DB::RaftCmdHeader): Code: 48, e.displayText() = DB::Exception: Reading mismatch data type pack. Cast from UInt32 to Int32 is NOT supported!: (while reading from DTFile: /data/tidb-data/tiflash-9000/data/t_87694/stable/dmf_3840), e.what() = DB::Exception, Stack trace:\
\
0. bin/tiflash/tiflash(StackTrace::StackTrace()+0x16) [0x3921fe6]\
1. bin/tiflash/tiflash(DB::DM::convertColumnByColumnDefineIfNeed(std::shared_ptr<DB::IDataType const> const&, COWPtr<DB::IColumn>::immutable_ptr<DB::IColumn>&&, DB::DM::ColumnDefine const&)+0x1ed) [0x7e2b4cd]\
2. bin/tiflash/tiflash(DB::DM::DMFileReader::read()+0x37d) [0x794450d]\
3. bin/tiflash/tiflash(DB::DM::DMFileBlockInputStream::read()+0x15) [0x78ec0b5]\
4. bin/tiflash/tiflash(DB::DM::ConcatSkippableBlockInputStream::read()+0xa8) [0x790f668]\
5. bin/tiflash/tiflash(DB::DM::DeltaMergeBlockInputStream<DB::DM::DeltaValueReader, DB::DM::DTCompactedEntries<55ul, 20ul, 3ul>::Iterator, false>::fillStableBlockIfNeeded()+0x90) [0x7903990]\
6. bin/tiflash/tiflash(DB::DM::DeltaMergeBlockInputStream<DB::DM::DeltaValueReader, DB::DM::DTCompactedEntries<55ul, 20ul, 3ul>::Iterator, false>::read()+0x680) [0x7904380]\
7. bin/tiflash/tiflash(DB::DM::DMRowKeyFilterBlockInputStream<true>::read()+0x5b) [0x78f476b]\
8. bin/tiflash/tiflash(DB::DM::PKSquashingBlockInputStream<false>::read()+0x6f4) [0x7901954]\
9. bin/tiflash/tiflash(DB::DM::DMVersionFilterBlockInputStream<1>::initNextBlock()+0x31) [0x7e1ee51]\
10. bin/tiflash/tiflash(DB::DM::DMVersionFilterBlockInputStream<1>::read(DB::PODArray<unsigned char, 4096ul, Allocator<false>, 15ul, 16ul>*&, bool)+0x1bb8) [0x7e21028]\
11. bin/tiflash/tiflash(DB::DM::DMVersionFilterBlockInputStream<1>::read()+0x18) [0x78eb7e8]\
12. bin/tiflash/tiflash(DB::DM::writeIntoNewDMFile(DB::DM::DMContext&, std::shared_ptr<std::vector<DB::DM::ColumnDefine, std::allocator<DB::DM::ColumnDefine> > > const&, std::shared_ptr<DB::IBlockInputStream> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DB::DM::DMFileWriter::Flags)+0x1ab) [0x78d9fdb]\
13. bin/tiflash/tiflash(DB::DM::createNewStable(DB::DM::DMContext&, std::shared_ptr<std::vector<DB::DM::ColumnDefine, std::allocator<DB::DM::ColumnDefine> > > const&, std::shared_ptr<DB::IBlockInputStream> const&, unsigned long, DB::DM::WriteBatches&)+0xbc) [0x78da6dc]\
14. bin/tiflash/tiflash(DB::DM::Segment::prepareMergeDelta(DB::DM::DMContext&, std::shared_ptr<std::vector<DB::DM::ColumnDefine, std::allocator<DB::DM::ColumnDefine> > > const&, std::shared_ptr<DB::DM::SegmentSnapshot> const&, DB::DM::WriteBatches&) const+0xd0) [0x78e45c0]\
15. bin/tiflash/tiflash(DB::DM::DeltaMergeStore::segmentMergeDelta(DB::DM::DMContext&, std::shared_ptr<DB::DM::Segment> const&, DB::DM::DeltaMergeStore::TaskRunThread)+0x4af) [0x78b1c1f]\
16. bin/tiflash/tiflash(DB::DM::DeltaMergeStore::checkSegmentUpdate(std::shared_ptr<DB::DM::DMContext> const&, std::shared_ptr<DB::DM::Segment> const&, DB::DM::DeltaMergeStore::ThreadType)+0xb59) [0x78b3509]\
17. bin/tiflash/tiflash(DB::DM::DeltaMergeStore::waitForWrite(std::shared_ptr<DB::DM::DMContext> const&, std::shared_ptr<DB::DM::Segment> const&)+0x193) [0x78b51f3]\
18. bin/tiflash/tiflash(DB::DM::DeltaMergeStore::write(DB::Context const&, DB::Settings const&, DB::Block&&)+0x731) [0x78b5ac1]\
19. bin/tiflash/tiflash() [0x7a7a36e]\
20. bin/tiflash/tiflash() [0x7a7ae37]\
21. bin/tiflash/tiflash(DB::RegionTable::writeBlockByRegion(DB::Context&, DB::RegionPtrWithBlock const&, std::vector<std::tuple<DB::RawTiDBPK, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> >, std::allocator<std::tuple<DB::RawTiDBPK, unsigned char, unsigned long, std::shared_ptr<DB::StringObject<false> const> > > >&, Poco::Logger*, bool)+0x84) [0x7a7b164]\
22. bin/tiflash/tiflash(DB::Region::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, DB::TMTContext&)+0x30a) [0x7a88a5a]\
23. bin/tiflash/tiflash(DB::KVStore::handleWriteRaftCmd(DB::WriteCmdsView const&, unsigned long, unsigned long, unsigned long, DB::TMTContext&)+0x5b) [0x7a7320b]\
24. bin/tiflash/tiflash(HandleWriteRaftCmd+0x31) [0x7a7ea31]\
25. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0x1389469) [0x7f8e721d5469]\
26. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0x138f564) [0x7f8e721db564]\
27. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0x1364e2f) [0x7f8e721b0e2f]\
28. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0xd3968b) [0x7f8e71b8568b]\
29. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0xd7f642) [0x7f8e71bcb642]\
30. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0xdad9f7) [0x7f8e71bf99f7]\
31. /data/tidb-deploy/tiflash-9000/bin/tiflash/libtiflash_proxy.so(+0x14ef91b) [0x7f8e7233b91b]\
"] [thread_id=45]