АЗ
Size: a a a
АЗ
АЗ
DC
DC
АЗ
АЗ
DC
DC
АЗ
D
D
DC
D
AS
Wrote block with ID
), было создано 402 парта. Мониторил system.parts во время работы запроса - количество активных партов держалось на уровне 150-155, после схлопывания осталось 9. Все в одной партиции.[ch-node1] 2021.07.05 16:34:42.913683 [ 12862 ] {4f5ead6c-c027-4952-ac2c-eed4a4601194} <Debug> executeQuery: (from 127.0.0.1:41406) insert into rlc.Delta(eventDate, cpName, macroRegion, shoulder, record_id, ts) select mv.eventDate , mv.cpName , mv.macroRegion , mv.shoulder , mv.record_id , toDateTime('2021-07-05 14:00:00', 'Europe/Moscow') as ts from rlc.ComparedRecords mv final where 1=1 and minFit > 0;
[ch-node1] 2021.07.05 16:34:42.918273 [ 12862 ] {4f5ead6c-c027-4952-ac2c-eed4a4601194} <Debug> rlc.ComparedRecords (SelectExecutor): Key condition: unknown, unknown, and
[ch-node1] 2021.07.05 16:34:42.918330 [ 12862 ] {4f5ead6c-c027-4952-ac2c-eed4a4601194} <Debug> rlc.ComparedRecords (SelectExecutor): MinMax index condition: unknown, unknown, and
[ch-node1] 2021.07.05 16:34:42.945698 [ 12862 ] {4f5ead6c-c027-4952-ac2c-eed4a4601194} <Debug> rlc.ComparedRecords (SelectExecutor): Selected 973 parts by date, 973 parts by key, 603770 marks by primary key, 603770 marks to read from 973 ranges
...
[ch-node1] 2021.07.05 17:05:35.203153 [ 12862 ] {4f5ead6c-c027-4952-ac2c-eed4a4601194} <Error> executeQuery: Code: 225, e.displayText() = DB::Exception: ZooKeeper session has been expired.: While executing SinkToOutputStream (version 20.8.3.18 (official build)) (from 127.0.0.1:41406) (in query: insert into rlc.Delta(eventDate, cpName, macroRegion, shoulder, record_id, ts) select mv.eventDate , mv.cpName , mv.macroRegion , mv.shoulder , mv.record_id , toDateTime('2021-07-05 14:00:00', 'Europe/Moscow') as ts from rlc.ComparedRecords mv final where 1=1 and minFit > 0;), Stack trace (when copying this message, always include the lines below):
0. Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1a80cd70 in /usr/bin/clickhouse
1. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0xff9e75d in /usr/bin/clickhouse
2. ? @ 0x17d76211 in /usr/bin/clickhouse
3. DB::ReplicatedMergeTreeBlockOutputStream::commitPart(std::__1::shared_ptr<zkutil::ZooKeeper>&, std::__1::shared_ptr<DB::IMergeTreeDataPart>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x17d73269 in /usr/bin/clickhouse
4. DB::ReplicatedMergeTreeBlockOutputStream::write(DB::Block const&) @ 0x17d75582 in /usr/bin/clickhouse
5. DB::PushingToViewsBlockOutputStream::write(DB::Block const&) @ 0x174572b6 in /usr/bin/clickhouse
6. DB::AddingDefaultBlockOutputStream::write(DB::Block const&) @ 0x1745d469 in /usr/bin/clickhouse
7. DB::SquashingBlockOutputStream::write(DB::Block const&) @ 0x1745cac4 in /usr/bin/clickhouse
8. DB::CountingBlockOutputStream::write(DB::Block const&) @ 0x173ac6ec in /usr/bin/clickhouse
9. DB::SinkToOutputStream::consume(DB::Chunk) @ 0x181251b3 in /usr/bin/clickhouse
10. DB::ISink::work() @ 0x17ee7950 in /usr/bin/clickhouse
11. ? @ 0x17f20460 in /usr/bin/clickhouse
12. ? @ 0x17f250ad in /usr/bin/clickhouse
13. ? @ 0x17f25976 in /usr/bin/clickhouse
14. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xffce517 in /usr/bin/clickhouse
15. ? @ 0xffccb53 in /usr/bin/clickhouse
16. start_thread @ 0x7dd5 in /usr/lib64/libpthread-2.17.so
17. clone @ 0xfe02d in /usr/lib64/libc-2.17.so
Received exception from server (version 20.8.3):
Code: 225. DB::Exception: Received from localhost:9000. DB::Exception: ZooKeeper session has been expired.: While executing SinkToOutputStream.
0 rows in set. Elapsed: 1852.302 sec. Processed 2.81 billion rows, 39.29 GB (1.52 million rows/s., 21.21 MB/s.)
D
select * from system.mutations m where is_done = 0
BackgroundPoolTask 16
BackgroundMovePoolTask 0
BackgroundSchedulePoolTask 2
BackgroundBufferFlushSchedulePoolTask 0
BackgroundDistributedSchedulePoolTask 0
(ReplicatedMergeTreeQueue): Not executing log entry MUTATE_PART for part 20210523-421_42_42_0_44 because source parts size (30.42 MiB) is greater than the current maximum (0.00 B).
...
(ReplicatedMergeTreeQueue): Not executing log entry MERGE_PARTS for part 20210705-191_50_55_1 because source parts size (55.24 MiB) is greater than the current maximum (4.45 MiB).
ALTER TABLE ttt
MODIFY SETTING max_bytes_to_merge_at_min_space_in_pool=161061273600, number_of_free_entries_in_pool_to_lower_max_size_of_merge=1,
number_of_free_entries_in_pool_to_execute_mutation=1;
ЯК
ЯК
c
D