"Part <partname> already exists" on INSERT

171 views
Skip to first unread message

Alexander Kononov

unread,
Oct 13, 2016, 7:01:13 AM10/13/16
to ClickHouse
При загрузке данных из TSV получаю сообщение DB::Exception: Part 19700101_19700101_1622_6238_1 already exists
В какую сторону копать?
В логе сервера такое сообщение:
2016.10.13 13:16:47.695 [ 4 ] <Error> stat.appstat2 (Merger): Part 19700101_19700101_1622_6238_1 intersects previous part
2016.10.13 13:16:47.695 [ 4 ] <Error> stat.appstat2 (Merger): Part 19700101_19700118_1810_6802_10 intersects previous part
2016.10.13 13:16:47.700 [ 7 ] <Error> void DB::BackgroundProcessingPool::threadFunction(): Code: 235, e.displayText() = DB::Exception: Part 19700101_19700101_1622_6238_1 already exists, e.what() = DB::Exception, Stack trace:

0. clickhouse-server(StackTrace::StackTrace()+0xe) [0xfd7c7e]
1. clickhouse-server(DB::Exception::Exception(std::string const&, int)+0x1e) [0xf72a6e]
2. clickhouse-server(DB::MergeTreeData::renameTempPartAndReplace(std::shared_ptr<DB::MergeTreeDataPart>&, SimpleIncrement*, DB::MergeTreeData::Transaction*)+0xc95) [0x10fb085]
3. clickhouse-server(DB::MergeTreeDataMerger::renameMergedTemporaryPart(std::vector<std::shared_ptr<DB::MergeTreeDataPart const>, std::allocator<std::shared_ptr<DB::MergeTreeDataPart const> > >&, std::shared_ptr<DB::MergeTreeDataPart>&, std::string const&, DB::MergeTreeData::Transaction*)+0x38) [0x1143db8]
4. clickhouse-server(DB::StorageMergeTree::merge(unsigned long, bool, DB::BackgroundProcessingPool::Context*, std::string const&, bool)+0x4f8) [0x10969c8]
5. clickhouse-server(DB::StorageMergeTree::mergeTask(DB::BackgroundProcessingPool::Context&)+0xf3) [0x10970b3]
6. clickhouse-server(DB::BackgroundProcessingPool::threadFunction()+0x3ad) [0x10ebbbd]
7. clickhouse-server(execute_native_thread_routine+0x20) [0x3133e00]
8. /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7ff359846182]
9. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ff358e6147d]

2016.10.13 13:16:47.705 [ 4 ] <Error> void DB::BackgroundProcessingPool::threadFunction(): Code: 235, e.displayText() = DB::Exception: Part 19700101_19700101_1622_6238_1 already exists, e.what() = DB::Exception, Stack trace:

0. clickhouse-server(StackTrace::StackTrace()+0xe) [0xfd7c7e]
1. clickhouse-server(DB::Exception::Exception(std::string const&, int)+0x1e) [0xf72a6e]
2. clickhouse-server(DB::MergeTreeData::renameTempPartAndReplace(std::shared_ptr<DB::MergeTreeDataPart>&, SimpleIncrement*, DB::MergeTreeData::Transaction*)+0xc95) [0x10fb085]
3. clickhouse-server(DB::MergeTreeDataMerger::renameMergedTemporaryPart(std::vector<std::shared_ptr<DB::MergeTreeDataPart const>, std::allocator<std::shared_ptr<DB::MergeTreeDataPart const> > >&, std::shared_ptr<DB::MergeTreeDataPart>&, std::string const&, DB::MergeTreeData::Transaction*)+0x38) [0x1143db8]
4. clickhouse-server(DB::StorageMergeTree::merge(unsigned long, bool, DB::BackgroundProcessingPool::Context*, std::string const&, bool)+0x4f8) [0x10969c8]
5. clickhouse-server(DB::StorageMergeTree::mergeTask(DB::BackgroundProcessingPool::Context&)+0xf3) [0x10970b3]
6. clickhouse-server(DB::BackgroundProcessingPool::threadFunction()+0x3ad) [0x10ebbbd]
7. clickhouse-server(execute_native_thread_routine+0x20) [0x3133e00]
8. /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7ff359846182]
9. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7ff358e6147d]

man...@gmail.com

unread,
Oct 13, 2016, 7:59:14 PM10/13/16
to ClickHouse
Сообщения "intersects previous part" свидетельствуют об ошибке, с которой нам нужно разобраться.
Скорее всего, это связано со вставкой данных с неправильной датой (1970-01-01).

Можете привести пример, как вставляются данные; возможно, какой-нибудь минимальный dataset?
При желании, можете отправить его отдельно на рассылку clickhous...@yandex-team.com
Reply all
Reply to author
Forward
0 new messages