Merged
Conversation
Member
Author
|
Test failure reported #48688 |
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Aug 9, 2023
In ClickHouse#20202 DROP COLUMN had been made no-op, i.e. it simply hardlinked everything and no columns had been removed. In most of the cases this is OK, however Vertical merge may inject another column instead of current if it does not exists (injectRequiredColumns(LoadedMergeTreeDataPartInfoForReader{}) in MergeTreeSequentialSource ctor), and it may select this already removed column and it will fail with an error: DB::Exception: There is no column legacy_features_Map.count in table. (NO_SUCH_COLUMN_IN_TABLE), Stack trace (when copying this message, always include the lines below): 0. src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xe0c67d5 in /usr/lib/debug/usr/bin/clickhouse.debug 2. src/Storages/StorageSnapshot.cpp:111: DB::StorageSnapshot::getColumn(DB::GetColumnsOptions const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const @ 0x13ff1cb3 in /usr/lib/debug/usr/bin/clickhouse.debug 3. contrib/llvm-project/libcxx/include/new:246: DB::StorageSnapshot::getColumnsByNames(DB::GetColumnsOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) const @ 0x13ff19f1 in /usr/lib/debug/usr/bin/clickhouse.debug 4. src/Storages/MergeTree/MergeTreeSequentialSource.cpp:0: DB::MergeTreeSequentialSource::MergeTreeSequentialSource(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageSnapshot> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::optional<DB::MarkRanges>, bool, bool, bool, bool) @ 0x143d108c in /usr/lib/debug/usr/bin/clickhouse.debug 5. contrib/llvm-project/libcxx/include/__memory/construct_at.h:35: DB::createMergeTreeSequentialSource(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageSnapshot> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, bool, bool, bool, std::__1::shared_ptr<std::__1::atomic<unsigned long>>) @ 0x143d25ee in /usr/lib/debug/usr/bin/clickhouse.debug 6. contrib/llvm-project/libcxx/include/vector:434: DB::MergeTask::VerticalMergeStage::prepareVerticalMergeForOneColumn() const @ 0x1422c525 in /usr/lib/debug/usr/bin/clickhouse.debug Such merges can be distinguished with the following message in logs: Part X doesn't change up to mutation version Y (optimized) ^^^^^^^^^^^ Funny that this has been accidentally fixed in the PR with the title "Remove strange code from MutateTask" (ClickHouse#48666) Signed-off-by: Azat Khuzhin <[email protected]>
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Aug 17, 2023
In ClickHouse#20202 DROP COLUMN had been made no-op, i.e. it simply hardlinked everything and no columns had been removed. In most of the cases this is OK, however Vertical merge may inject another column instead of current if it does not exists (injectRequiredColumns(LoadedMergeTreeDataPartInfoForReader{}) in MergeTreeSequentialSource ctor), and it may select this already removed column and it will fail with an error: DB::Exception: There is no column legacy_features_Map.count in table. (NO_SUCH_COLUMN_IN_TABLE), Stack trace (when copying this message, always include the lines below): 0. src/Common/Exception.cpp:91: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xe0c67d5 in /usr/lib/debug/usr/bin/clickhouse.debug 2. src/Storages/StorageSnapshot.cpp:111: DB::StorageSnapshot::getColumn(DB::GetColumnsOptions const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const @ 0x13ff1cb3 in /usr/lib/debug/usr/bin/clickhouse.debug 3. contrib/llvm-project/libcxx/include/new:246: DB::StorageSnapshot::getColumnsByNames(DB::GetColumnsOptions const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) const @ 0x13ff19f1 in /usr/lib/debug/usr/bin/clickhouse.debug 4. src/Storages/MergeTree/MergeTreeSequentialSource.cpp:0: DB::MergeTreeSequentialSource::MergeTreeSequentialSource(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageSnapshot> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::optional<DB::MarkRanges>, bool, bool, bool, bool) @ 0x143d108c in /usr/lib/debug/usr/bin/clickhouse.debug 5. contrib/llvm-project/libcxx/include/__memory/construct_at.h:35: DB::createMergeTreeSequentialSource(DB::MergeTreeData const&, std::__1::shared_ptr<DB::StorageSnapshot> const&, std::__1::shared_ptr<DB::IMergeTreeDataPart const>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, bool, bool, bool, std::__1::shared_ptr<std::__1::atomic<unsigned long>>) @ 0x143d25ee in /usr/lib/debug/usr/bin/clickhouse.debug 6. contrib/llvm-project/libcxx/include/vector:434: DB::MergeTask::VerticalMergeStage::prepareVerticalMergeForOneColumn() const @ 0x1422c525 in /usr/lib/debug/usr/bin/clickhouse.debug Such merges can be distinguished with the following message in logs: Part X doesn't change up to mutation version Y (optimized) ^^^^^^^^^^^ Funny that this has been accidentally fixed in the PR with the title "Remove strange code from MutateTask" (ClickHouse#48666) Signed-off-by: Azat Khuzhin <[email protected]>
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
cc @amosbird