-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Indices with bad utf-8 names break parts #91417
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-skip-indexSkipping indexes (minmax, set, bloom) and their evaluation.Skipping indexes (minmax, set, bloom) and their evaluation.
Description
Company or project name
CH
Describe what's wrong
-- Tags: no-random-merge-tree-settings
DROP TABLE IF EXISTS test;
CREATE TABLE test (
col UInt8,
INDEX `minmax_index_Data2_\xFF\0привет���` col TYPE minmax() GRANULARITY 1
)
ENGINE = MergeTree ORDER BY col
SETTINGS add_minmax_index_for_numeric_columns=0
AS SELECT * FROM numbers(10);
SELECT count() FROM test;
SELECT min(col), max(col) FROM test;
DETACH TABLE test;
ATTACH TABLE test;
SELECT count() FROM test;
SELECT min(col), max(col) FROM test;
-- DROP TABLE test;
The part is considered broken and not attached:
10
0 9
0
0 0
Affects all releases
Does it reproduce on the most recent release?
Yes
How to reproduce
Run the demo
Expected behavior
The part created should be fine both before and after reattaching
Error message and/or stacktrace
[Mordor] 2025.12.03 07:59:07.436919 [ 438909 ] {2e0e0e9f-6075-42a4-ae6f-195b20b52550} <Error> test_yltekvdw.test (a8aaec28-49aa-48ce-a12e-1433551b72b4): Part /mnt/ch/ch_data/data/prod-1/store/a8a/a8aaec28-49aa-48ce-a12e-1433551b72b4/all_1_1_0/ is broken and needs manual correction. Reason: Code: 228. DB::Exception: store/a8a/a8aaec28-49aa-48ce-a12e-1433551b72b4/all_1_1_0/skp_idx_minmax_index_Data2_�привет���.idx2 has unexpected size: 50 instead of 28: columns: columns format version: 1
1 columns:
`col` UInt8
, getMarkSizeInBytes: 24, getMarksCount: 2, index_granularity_info: [mark_type: [adaptive: true, compressed: true, with_substreams: true, part_type: Compact], index_granularity_bytes: 10485760, fixed_index_granularity: 8192], index_granularity: [Constant(constant_granularity: 10, last_mark_granularity: 10, num_marks_without_final: 1, has_final_mark: true)], part_state: [state: Temporary, is_unexpected_local_part: false, is_frozen: false, is_duplicate: false]. (BAD_SIZE_OF_FILE_IN_DATA_PART), Stack trace (when copying this message, always include the lines below):
0. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__exception/exception.h:113: Poco::Exception::Exception(String const&, int) @ 0x00000000215c3af2
1. /mnt/ch/ClickHouse/src/Common/Exception.cpp:129: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000011f7b8ec
2. DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000988781c
3. DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000988730c
4. /mnt/ch/ClickHouse/src/Common/Exception.h:141: DB::Exception::Exception<std::filesystem::path, unsigned long&, unsigned long const&>(int, FormatStringHelperImpl<std::type_identity<std::filesystem::path>::type, std::type_identity<unsigned long&>::type, std::type_identity<unsigned long const&>::type>, std::filesystem::path&&, unsigned long&, unsigned long const&) @ 0x000000001b5bb3bb
5. /mnt/ch/ClickHouse/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp:77: DB::MergeTreeDataPartChecksum::checkSize(DB::IDataPartStorage const&, String const&) const @ 0x000000001b5b39c0
6. /mnt/ch/ClickHouse/src/Storages/MergeTree/IMergeTreeDataPart.cpp:2331: DB::IMergeTreeDataPart::checkConsistencyBase() const @ 0x000000001b41528f
7. /mnt/ch/ClickHouse/src/Storages/MergeTree/IMergeTreeDataPart.cpp:2397: DB::IMergeTreeDataPart::checkConsistency(bool) const @ 0x000000001b407fac
8. /mnt/ch/ClickHouse/src/Storages/MergeTree/IMergeTreeDataPart.cpp:989: DB::IMergeTreeDataPart::loadColumnsChecksumsIndexes(bool, bool, bool) @ 0x000000001b4026f7
9. /mnt/ch/ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp:1911: DB::MergeTreeData::loadDataPart(DB::MergeTreePartInfo const&, String const&, std::shared_ptr<DB::IDisk> const&, DB::MergeTreeDataPartState, DB::SharedMutex&) @ 0x000000001b4da141
10. /mnt/ch/ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp:2053: DB::MergeTreeData::loadDataPartWithRetries(DB::MergeTreePartInfo const&, String const&, std::shared_ptr<DB::IDisk> const&, DB::MergeTreeDataPartState, DB::SharedMutex&, unsigned long, unsigned long, unsigned long) @ 0x000000001b4df60a
11. /mnt/ch/ClickHouse/src/Storages/MergeTree/MergeTreeData.cpp:2115: void std::__function::__policy_func<void ()>::__call_func[abi:ne210105]<DB::MergeTreeData::loadDataPartsFromDisk(std::vector<std::shared_ptr<DB::MergeTreeData::PartLoadingTree::Node>, std::allocator<std::shared_ptr<DB::MergeTreeData::PartLoadingTree::Node>>>&)::$_0>(std::__function::__policy_storage const*) @ 0x000000001b57d0c8
12. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:508: ? @ 0x0000000013a29a54
13. /mnt/ch/ClickHouse/src/Common/threadPoolCallbackRunner.h:184: DB::ThreadPoolCallbackRunnerLocal<void, ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>, std::function<void ()>>::operator()(std::function<void ()>&&, Priority, std::optional<unsigned long>)::'lambda'()::operator()() @ 0x0000000013a297ee
14. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:508: ? @ 0x00000000120dcb7e
15. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:0: ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'()::operator()() @ 0x00000000120e1ff9
16. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__functional/function.h:508: ? @ 0x00000000120da6fc
17. /mnt/ch/ClickHouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:0: void* std::__thread_proxy[abi:ne210105]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x00000000120e020e
18. /usr/src/debug/glibc/glibc/nptl/pthread_create.c:448: btree_allocate_node @ 0x000000000009698b
19. ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78: __GI___clone3 @ 0x000000000011a9cc
(version 25.12.1.1)
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-skip-indexSkipping indexes (minmax, set, bloom) and their evaluation.Skipping indexes (minmax, set, bloom) and their evaluation.