Commit Graph

115663 Commits

Author SHA1 Message Date
Han Fei
a257ff6cf3 address comment 2023-05-22 10:41:22 +02:00
robot-clickhouse
a0b384bc48 Automatic style fix 2023-05-22 08:30:04 +00:00
Victor Krasnov
a7b641134a Follow the reviewer's recommendations regarding the documentation 2023-05-22 08:28:11 +00:00
Smita Kulkarni
855f0abcf9 Removed unneeded try-except 2023-05-22 10:20:45 +02:00
Antonio Andelic
3a46fe1803
Merge branch 'master' into write-buffer-from-s3 2023-05-22 09:28:14 +02:00
Antonio Andelic
b20ce5309f
Merge pull request #50020 from ClickHouse/keeper-check-ftruncate
Check return value of `ftruncate` in Keeper
2023-05-22 09:27:02 +02:00
Antonio Andelic
93cd47fd5f
Merge pull request #50026 from ClickHouse/fix-deadlock-attach-thread
Avoid deadlock when starting table in attach thread of `ReplicatedMergeTree`
2023-05-22 09:22:33 +02:00
SmitaRKulkarni
5dc010cc4f
Merge pull request #49556 from azat/parametrized-views-multi-use
Fix parameterized views when query parameter used multiple times in the query
2023-05-22 09:01:26 +02:00
Azat Khuzhin
c30658a9ed Fix hashed/sparse_hashed dictionaries max_load_factor upper range
Previously due to comparison of floats with doubles, it was incorrectly
works for the upper range:

    (lldb) p (float)0.99 > (float)0.99
    (bool) $0 = false
    (lldb) p (float)0.99 > (double)0.99
    (bool) $1 = true

This should also fix performance tests errors on CI:

    clickhouse_driver.errors.ServerException: Code: 36.
    DB::Exception: default.simple_key_HASHED_dictionary_l0_99: max_load_factor parameter should be within [0.5, 0.99], got 0.99. Stack trace:

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-22 08:59:48 +02:00
SmitaRKulkarni
bfb5ab8d73
Merge branch 'master' into parametrized-views-multi-use 2023-05-22 08:56:06 +02:00
lgbo-ustc
cc93f9ab52 update tests for flaky test 2023-05-22 10:17:41 +08:00
lgbo-ustc
35d8388705 update 2023-05-22 10:17:41 +08:00
lgbo-ustc
983514f946 update tests for using clause 2023-05-22 10:17:41 +08:00
lgbo-ustc
2582399271 fixed: a in-memory bucket contains rows of other buckets 2023-05-22 10:17:41 +08:00
lgbo-ustc
603c024eb0 ensure only the last processor could access non-joined blocks 2023-05-22 10:17:41 +08:00
lgbo-ustc
29ade23397 fixed: return invalid mismatch rows on full/right join 2023-05-22 10:17:41 +08:00
lgbo-ustc
80af345ea6 update 2023-05-22 10:17:41 +08:00
lgbo-ustc
d5efc0e688 update 2023-05-22 10:17:41 +08:00
lgbo-ustc
8efec9bcca add locks for getNonJoinedBlocks 2023-05-22 10:17:41 +08:00
lgbo-ustc
89dd538bea update 2023-05-22 10:17:41 +08:00
lgbo-ustc
5c44e6a562 triger ci 2023-05-22 10:17:40 +08:00
lgbo-ustc
d89beb1bf7 update tests 2023-05-22 10:17:40 +08:00
lgbo-ustc
7772fed161 update
1. fixed the memoery overflow problem when  handle all delayed buckets parallely
2. resue exists tests
2023-05-22 10:17:40 +08:00
lgbo-ustc
39db0f84d9 add comment 2023-05-22 10:17:40 +08:00
lgbo-ustc
39ff030a6e grace hash join supports right/full join 2023-05-22 10:17:40 +08:00
Igor Nikonov
f5dc07d052 tryReserve() cleanup
simplify removing eviction candidates
2023-05-21 22:01:28 +00:00
Han Fei
da8590a26c
Merge pull request #49902 from hanfei1991/hanfei/regexp-doc
refine docs for regexp tree dictionary
2023-05-21 23:42:35 +02:00
Han Fei
2625696591
Merge branch 'master' into hanfei/regexp-doc 2023-05-21 23:42:01 +02:00
Azat Khuzhin
ef06bb8f14 Fix crashing in case of Replicated database without arguments
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-21 23:12:39 +02:00
Azat Khuzhin
66cf16410d Preserve initial_query_id for ON CLUSTER queries
v2: add proper escaping
v3: set distributed_ddl_output_mode=none for test to fix replicated database build
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-21 23:04:54 +02:00
Azat Khuzhin
b6cc504717 Remove Common/OpenTelemetryTraceContext.h from Context.h
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-21 23:04:33 +02:00
Azat Khuzhin
0586a27432 Charge only server memory for dictionaries
Right now the memory will be counted for query/user for dictionary, but
only if it load by user (via SYSTEM RELOAD QUERY or via dictGet()), but
it could be also loaded in backgrounad (due to lifetime, or
update_field, so it is like Buffer, only server memory should be
charged.

v2: mark test as long
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Co-authored-by: Sergei Trifonov <svtrifonov@gmail.com>
2023-05-21 22:53:52 +02:00
Amos Bird
8a40a48a49
Fix python format 2023-05-22 00:44:17 +08:00
Alexander Tokmakov
8102fe3e21
Merge pull request #50047 from azat/tests/fix-02735_system_zookeeper_connection
Fix 02735_system_zookeeper_connection for DatabaseReplicated
2023-05-21 19:01:43 +03:00
Robert Schulze
2a9ff30a7f
Merge pull request #49380 from azat/dict/hashed-memory
Improve memory usage and speed of SPARSE_HASHED/HASHED dictionaries
2023-05-21 15:46:41 +02:00
Robert Schulze
491cf8b6e1
Fix minor mistakes 2023-05-21 13:43:05 +00:00
Robert Schulze
9d9d4e3d62
Some fixups 2023-05-21 13:40:52 +00:00
Robert Schulze
312f751503
Uppercase remaining SQL keywords 2023-05-21 13:08:55 +00:00
Amos Bird
0a3d986e42
Fix reporting projection broken part 2023-05-21 20:58:58 +08:00
serxa
44b1754ccf more profile events 2023-05-21 12:43:47 +00:00
robot-ch-test-poll3
0df785f8ba
Merge pull request #50049 from magurotuna/fix-broken-link
Fix broken link to async_insert_deduplicate in doc
2023-05-21 14:36:50 +02:00
serxa
c56e6a8b80 Add more profile events for distributconnections 2023-05-21 12:15:06 +00:00
Sergei Trifonov
3c002755e2
Merge pull request #50036 from ClickHouse/fix-load-balancing
Load balancing bugfixes
2023-05-21 11:21:55 +02:00
Yusuke Tanaka
2444e93ad7
Fix broken link to async_insert_deduplicate in doc 2023-05-21 14:42:17 +09:00
Azat Khuzhin
a9e834aea4 Fix 02735_system_zookeeper_connection for DatabaseReplicated
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-20 16:04:15 +02:00
kssenii
8924c17575 Fix build 2023-05-20 13:31:27 +02:00
vdimir
8b77e2096c
Merge pull request #49760 from arthurpassos/extract_kv_ignore_kv_delimiter_when_reading_value 2023-05-20 13:27:59 +02:00
Azat Khuzhin
82054d40a5 Add proper escaping for DDL OpenTelemetry context serialization
Before you was able to break the format by using "\n" or "\t", that will
simply lead to DDL hang, because DDLWorker will simply log the error and
do nothing more:

    <Error> DDLWorker: Cannot parse DDL task query-0000000056: Incorrect task format. Will try to send error status: Code: 27. DB::ParsingException: Cannot parse input: expected '\n' before: 'bar\n1\n'. (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 23.5.1.1)

Fix this by adding proper escaping.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-20 13:15:49 +02:00
Azat Khuzhin
cd5413a12d Refactor test 02423_ddl_for_opentelemetry to use clickhouse-client
This will allow to add new line into tracestate to check the format
breakage

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-20 13:14:43 +02:00
Azat Khuzhin
52c5fd5cb9 Rewrite OpenTelemetry context serialization for DDL without IO/Operators.h
This is required to switch to escaped versions.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-20 13:14:40 +02:00