*: Refine the error message when schema mismatch in ExchangeReceiver#9744
Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom Dec 27, 2024
Merged
Conversation
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
JaySon-Huang
commented
Dec 27, 2024
| bool meet_error; | ||
| String error_msg; | ||
| bool eof; | ||
| String error_msg; |
Contributor
Author
There was a problem hiding this comment.
Define error_msg after eof so that meet_error and eof can share the same padding and minimal the struct size of ExchangeReceiverResult
Comment on lines
+55
to
+59
| catch (DB::Exception & e) | ||
| { | ||
| e.addMessage(fmt::format("file_page_id={} meta_version={}", file_page_id, meta_version)); | ||
| e.rethrow(); | ||
| } |
Contributor
There was a problem hiding this comment.
Where does the Exception come from?
Contributor
Author
There was a problem hiding this comment.
when trying to use an old version tiflash binary but load new data type
[2024/12/26 23:27:43.778 +08:00] [ERROR] [Exception.cpp:91] ["Storage inited fail, keyspace=4294967295 table_id=127: Code: 50, e.displayText() = DB::Exception: Unknown data type family: StringV2: file_page_id=14494 meta_version=0: while restoreSegment, segment_id=7997 ident=keyspace=4294967295 table_id=127:
0x55a0533503d3 StackTrace::StackTrace() [tiflash+35009491]
dbms/src/Common/StackTrace.cpp:23
0x55a05334daa6 DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int) [tiflash+34998950]
dbms/src/Common/Exception.h:46
0x55a058b076db DB::DataTypeFactory::get(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST> const&) const [tiflash+126985947]
dbms/src/DataTypes/DataTypeFactory.cpp:119
0x55a058b0718b DB::DataTypeFactory::get(std::__1::shared_ptr<DB::IAST> const&) const [tiflash+126984587]
dbms/src/DataTypes/DataTypeFactory.cpp:87
0x55a058b0740a DB::DataTypeFactory::getOrSet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) [tiflash+126985226]
dbms/src/DataTypes/DataTypeFactory.cpp:56
0x55a0588d4228 DB::DM::ColumnStat::mergeFromProto(dtpb::ColumnStat const&) [tiflash+124678696]
dbms/src/Storages/DeltaMerge/File/ColumnStat.h:81
0x55a0588d0f90 DB::DM::DMFileMetaV2::parseExtendColumnStat(std::__1::basic_string_view<char, std::__1::char_traits<char>>) [tiflash+124665744]
dbms/src/Storages/DeltaMerge/File/DMFileMetaV2.cpp:127
0x55a0588d04b3 DB::DM::DMFileMetaV2::parse(std::__1::basic_string_view<char, std::__1::char_traits<char>>) [tiflash+124662963]
dbms/src/Storages/DeltaMerge/File/DMFileMetaV2.cpp:86
0x55a0588d2771 DB::DM::DMFileMetaV2::read(std::__1::shared_ptr<DB::FileProvider> const&, DB::DM::DMFileMeta::ReadMode const&) [tiflash+124671857]
dbms/src/Storages/DeltaMerge/File/DMFileMetaV2.cpp:292
0x55a0588af57e DB::DM::DMFile::restore(std::__1::shared_ptr<DB::FileProvider> const&, unsigned long, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DB::DM::DMFileMeta::ReadMode const&, unsigned long, unsigned int) [tiflash+124527998]
dbms/src/Storages/DeltaMerge/File/DMFile.cpp:0
0x55a058862b25 DB::DM::restoreDMFileFromLocal(DB::DM::DMContext const&, unsigned long, unsigned long) [tiflash+124214053]
dbms/src/Storages/DeltaMerge/RestoreDMFile.cpp:72
0x55a058859601 DB::DM::StableValueSpace::restore(DB::DM::DMContext&, DB::ReadBuffer&, unsigned long) [tiflash+124175873]
dbms/src/Storages/DeltaMerge/StableValueSpace.cpp:197
0x55a058859456 DB::DM::StableValueSpace::restore(DB::DM::DMContext&, unsigned long) [tiflash+124175446]
dbms/src/Storages/DeltaMerge/StableValueSpace.cpp:182
0x55a05879d494 DB::DM::Segment::restoreSegment(std::__1::shared_ptr<DB::Logger> const&, DB::DM::DMContext&, unsigned long) [tiflash+123405460]
dbms/src/Storages/DeltaMerge/Segment.cpp:429
0x55a058732c07 std::__1::__function::__func<DB::DM::DeltaMergeStore::DeltaMergeStore(DB::Context&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, long, long, bool, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine>> const&, DB::DM::ColumnDefine const&, bool, unsigned long, std::__1::shared_ptr<std::__1::vector<DB::DM::LocalIndexInfo, std::__1::allocator<DB::DM::LocalIndexInfo>>>, DB::DM::DeltaMergeStore::Settings const&, DB::ThreadPoolImpl<DB::ThreadFromGlobalPoolImpl<false>>*)::$_1, std::__1::allocator<DB::DM::DeltaMergeStore::DeltaMergeStore(DB::Context&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int, long, long, bool, std::__1::vector<DB::DM::ColumnDefine, std::__1::allocator<DB::DM::ColumnDefine>> const&, DB::DM::ColumnDefine const&, bool, unsigned long, std::__1::shared_ptr<std::__1::vector<DB::DM::LocalIndexInfo, std::__1::allocator<DB::DM::LocalIndexInfo>>>, DB::DM::DeltaMergeStore::Settings const&, DB::ThreadPoolImpl<DB::ThreadFromGlobalPoolImpl<false>>*)::$_1>, void ()>::operator()() [tiflash+122969095]
dbms/src/Storages/DeltaMerge/DeltaMergeStore.cpp:295
0x55a0534088f5 std::__1::packaged_task<void ()>::operator()() [tiflash+35764469]
/DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/future:1891
0x55a053406e05 DB::ThreadPoolImpl<DB::ThreadFromGlobalPoolImpl<false>>::worker(std::__1::__list_iterator<DB::ThreadFromGlobalPoolImpl<false>, void*>) [tiflash+35757573]
/DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__functional/function.h:517
0x55a053409723 std::__1::__function::__func<DB::ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void DB::ThreadPoolImpl<DB::ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), std::__1::allocator<DB::ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<void DB::ThreadPoolImpl<DB::ThreadFromGlobalPoolImpl<false>>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'()>, void ()>::operator()() [tiflash+35768099]
dbms/src/Common/UniThreadPool.cpp:167
0x55a0534055f5 DB::ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) [tiflash+35751413]
/DATA/disk1/ra_common/tiflash-env-17/sysroot/bin/../include/c++/v1/__functional/function.h:517
0x55a053407cf5 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void DB::ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) [tiflash+35761397]
dbms/src/Common/UniThreadPool.cpp:167
0x7fc92f140802 start_thread [libc.so.6+653314]
0x7fc92f0e0450 clone3 [libc.so.6+259152]
JinheLin
approved these changes
Dec 27, 2024
Lloyd-Pottiger
approved these changes
Dec 27, 2024
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JinheLin, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
[LGTM Timeline notifier]Timeline:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: ref #9673
Problem Summary:
What is changed and how it works?
Changes:
After this PR:
If we set a illegal storage.format_version
If we meet unexpected data type when restarting tiflash
If some tiflash is upgrade to use the new string serde format, while some tiflash is not
Check List
Tests
Side effects
Documentation
Release note