Merge branch 'master' of github.com:ClickHouse/ClickHouse into debug-01600_parts_states_metrics_long

This commit is contained in:
Alexey Milovidov 2024-07-29 01:01:28 +02:00
commit 995623eb0e
10 changed files with 70 additions and 65 deletions

View File

@ -810,6 +810,7 @@ bool CachedOnDiskReadBufferFromFile::nextImplStep()
{
last_caller_id = FileSegment::getCallerId();
chassert(file_offset_of_buffer_end <= read_until_position);
if (file_offset_of_buffer_end == read_until_position)
return false;
@ -1051,7 +1052,11 @@ bool CachedOnDiskReadBufferFromFile::nextImplStep()
if (download_current_segment && download_current_segment_succeeded)
chassert(file_segment.getCurrentWriteOffset() >= file_offset_of_buffer_end);
chassert(file_offset_of_buffer_end <= read_until_position);
chassert(
file_offset_of_buffer_end <= read_until_position,
fmt::format("Expected {} <= {} (size: {}, read range: {})",
file_offset_of_buffer_end, read_until_position, size, current_read_range.toString()));
}
swap(*implementation_buffer);

View File

@ -1,12 +0,0 @@
10000000
10000000 1274991808
30000000
30000000 3824991808
10000000
10000000 1274991808
30000000
30000000 3824991808
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -1,48 +0,0 @@
set allow_suspicious_low_cardinality_types=1;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = TinyLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = Log;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num(  num UInt8,  arr Array(LowCardinality(Int64)) default [num]  ) ENGINE = StripeLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = TinyLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = Log;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -0,0 +1,4 @@
10000000
10000000 1274991808
30000000
30000000 3824991808

View File

@ -0,0 +1,16 @@
set allow_suspicious_low_cardinality_types = 1, max_rows_to_read = '31M';
drop table if exists perf_lc_num;
CREATE TABLE perf_lc_num( num UInt8, arr Array(LowCardinality(Int64)) default [num] ) ENGINE = StripeLog;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
INSERT INTO perf_lc_num (num) SELECT toUInt8(number) FROM numbers(10000000, 20000000);
select sum(length(arr)) from perf_lc_num;
select sum(length(arr)), sum(num) from perf_lc_num;
drop table if exists perf_lc_num;

View File

@ -1,4 +1,4 @@
-- Tags: long
-- Tags: long, no-tsan
drop table if exists buffer_02231;
drop table if exists out_02231;
@ -11,8 +11,8 @@ create table buffer_02231
(
key Int,
v1 AggregateFunction(groupArray, String)
) engine=Buffer(currentDatabase(), 'out_02231',
/* layers= */1,
) engine = Buffer(currentDatabase(), 'out_02231',
/* layers= */ 1,
/* min/max time */ 86400, 86400,
/* min/max rows */ 1e9, 1e9,
/* min/max bytes */ 1e12, 1e12,
@ -29,7 +29,7 @@ from in_02231
group by key;
set optimize_trivial_insert_select = 1;
insert into in_02231 select * from numbers(10e6) settings max_memory_usage='400Mi', max_threads=1;
insert into in_02231 select * from numbers(5e6) settings max_memory_usage='40Mi', max_threads=1, min_insert_block_size_rows = 10000, min_insert_block_size_bytes = '10Mi';
drop table buffer_02231;
drop table out_02231;