Commit Graph

16963 Commits

Author SHA1 Message Date
Alexander Gololobov
39001cce0e Use user specified db instead of "config" 2024-04-29 18:05:37 +02:00
Alexey Milovidov
c570316c87
Merge branch 'master' into analyzer-support-recursive-cte 2024-04-29 02:26:59 +02:00
Maksim Kita
f5cfe597f2 Fixed tests 2024-04-28 12:52:17 +03:00
Maksim Kita
bd1189de70 Fixed tests 2024-04-28 12:52:17 +03:00
Azat Khuzhin
478ba92ddd Improve error message on checksum mismatch during fetches
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-28 07:34:07 +02:00
Azat Khuzhin
d278866d52 Add copy_data_failpoint failpoint
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-28 07:34:07 +02:00
Alexey Milovidov
5a7e7a9f2f Merge branch 'master' into too-many-parts-in-move-partition 2024-04-27 16:02:02 +02:00
Alexander Tokmakov
7fb78aa4d4
Merge pull request #60856 from azat/alter-select-throughtput-v2
[RFC] Reduce overhead of the mutations for SELECTs (v2)
2024-04-26 17:46:57 +00:00
Nikolai Kochetov
0038f322e8
Merge pull request #62916 from ClickHouse/fix-prewhere-for-storage-buffer-with-different-types
Fix PREWHERE for StorageBuffer with different source table column types.
2024-04-25 14:40:11 +00:00
Azat Khuzhin
5d72a34561 Add some comments for getAlterMutationCommandsForPart()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Azat Khuzhin
e5650f8af3 Move add_to_result() out from loop
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Azat Khuzhin
e0b83bde50 Consider alter_conversions_mutations as valid only if part metadata version matches
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Azat Khuzhin
d2a922bd44 Revert "Fix processing INSERT after metadata mutations that had not been applied yet"
The problem is that the atomic counter (alter_conversions_mutations) is
not accounted correctly for IMergeTreeDataPart::getMetadataVersion()

This reverts commit 0124642b39f538eaf2b1c7cfab9a0a917b1b12f6.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Azat Khuzhin
c048ab9d6d Fix processing INSERT after metadata mutations that had not been applied yet
The problem is that right now INSERT may write old columns even after
metadata mutation (i.e. RENAME), because it will simply write the new
block number that is bigger then metadata version, and so this part
won't be mutated.

To fix this, it should get the mutation version from metadata - this is
quite a major change!

Fixes: 2555_davengers_rename_chain
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Azat Khuzhin
be6777bc86 Reduce overhead of the mutations for SELECTs (v2)
SELECTs are affected by the mutations, since it tries to apply them on
fly, and scanning over existing mutations can take significant amount of
time (for simple queries, i.e. count())

And also even after mutation had been finished, it still a problem,
because mutations are not removed instantly.

So instead introduce an atomic counter alter_conversions_mutations, that
is incremented for new mutations and decremented once mutation
finished/killed, that way once the mutation finished they will not
affect queries.

Here are some numbers for non-RENAME mutations:

    rmt vanilla w/o mutations | queries: 3693, QPS: 494.813
    rmt vanilla w/ mutations  | queries: 2190, QPS: 388.256
    rmt patched w/o mutations | queries: 3168, QPS: 620.061
    rmt patched w/ mutations  | queries: 3155, QPS: 614.424
    mt vanilla w/o mutations  | queries: 3498, QPS: 656.399
    mt vanilla w/ mutations   | queries: 3821, QPS: 600.425
    mt patched w/o mutations  | queries: 5732, QPS: 745.585
    mt patched w/ mutations   | queries: 4719, QPS: 715.034

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-25 14:35:21 +02:00
Nikolai Kochetov
01d8dda773 Fix PREWHERE for StorageBuffer with different source table column types. 2024-04-24 15:07:14 +00:00
Amos Bird
d44062edb2
Fix LowCardinality(Nullable) key in hyperrectangle 2024-04-23 15:24:28 +08:00
Nikita Taranov
aaaff1f2ea
Merge pull request #62067 from nickitat/stronger_optimize_final_with_rmt
Wait for currently active merges when executing `OPTIMIZE FINAL` on RMT
2024-04-22 19:54:48 +00:00
Nikita Taranov
28c4ce1a67
Merge pull request #61876 from arthurpassos/forbid_attach_table_duplicated_replica_path
Do not allow table to be attached if there already is an active replica path
2024-04-22 19:44:20 +00:00
Alexey Milovidov
788e4d35ee
Merge pull request #62813 from ClickHouse/kafka-log-consumer-id-with-librdkafka-logs
Add `client.id` to librdkafka logs
2024-04-20 21:06:14 +00:00
János Benjamin Antal
e5ca964808 Add client.id to librdkafka logs 2024-04-20 10:42:27 +00:00
Alexey Milovidov
968d8b7ee5
Merge pull request #62152 from JackyWoo/add_query_progress_to_table_zookeeper
Add query progress to table zookeeper
2024-04-20 00:48:31 +00:00
Anton Popov
260647a309
Merge pull request #62762 from CurtizJ/fix-merge-tree-index-crash
Fix crash in function `mergeTreeIndex`
2024-04-19 11:53:02 +00:00
Anton Popov
d6a7fa315e fix crash in function mergeTreeIndex 2024-04-18 14:46:58 +00:00
jsc0218
7525b2acf4
Merge pull request #60117 from jsc0218/TableEngineGrant_version2
TableEngineGrant_version2
2024-04-18 14:30:34 +00:00
Arthur Passos
a852855a2d
Merge branch 'ClickHouse:master' into forbid_attach_table_duplicated_replica_path 2024-04-18 09:27:07 -03:00
Yarik Briukhovetskyi
a3dcb1963f
Merge pull request #62524 from helifu/master
Fix a bug moving one partition from one to itself
2024-04-17 12:20:17 +00:00
Robert Schulze
2b23c7cc30
Change query cache keys from ASTs to AST hashes 2024-04-16 09:27:20 +00:00
JackyWoo
59f061c194 Merge branch 'master' into add_query_progress_to_table_zookeeper 2024-04-16 15:09:44 +08:00
Alexander Gololobov
ea42c98dd7
Merge pull request #62613 from ClickHouse/stream_system_remote_data_paths
Stream chunks from system.remote_data_paths
2024-04-16 05:27:08 +00:00
Alexander Gololobov
5590b26c2b
typo 2024-04-15 23:38:45 +01:00
Alexander Gololobov
e53752db04
Simplify
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2024-04-15 23:35:42 +01:00
Alexander Gololobov
0265fabfca
typo
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2024-04-15 23:33:58 +01:00
Sema Checherinda
59369e99c5
Merge pull request #62648 from ClickHouse/chesema-s3-function
set correct defaults for s3 storage and backups
2024-04-15 15:12:31 +00:00
Robert Schulze
2a3b5bd74d
Merge pull request #58956 from AVMusorin/kafka-settings
Separate consumer/producer settings for Kafka
2024-04-15 15:11:19 +00:00
Nikolay Degterinsky
0a2d7a8d93 Merge remote-tracking branch 'upstream/master' into hive-segfault 2024-04-15 12:50:47 +00:00
Alexander Tokmakov
3ddf3e3d5f
Merge pull request #61976 from azat/rmt/stop-merges-primarily
Check for "SYSTEM STOP MERGES" primarily for MERGE_PARTS/MUTATE_PART
2024-04-15 12:21:22 +00:00
Sema Checherinda
b18d3febb7 set correct defaults for s3 storage and backups 2024-04-15 13:03:55 +02:00
Kruglov Pavel
c458920ee5
Merge pull request #62425 from Avogar/fix-partitioned-write
Respect settings truncate_on_insert/create_new_file_on_insert in s3/hdfs/azure engines during partitioned write
2024-04-15 10:29:18 +00:00
jsc0218
b6cfba33f1
Merge pull request #62319 from mxwell/materialized_prim_key
Fix primary key in materialized view
2024-04-13 03:37:20 +00:00
Alexander Gololobov
2a2ae399db Use disk name from DisksMap 2024-04-12 22:11:58 +02:00
Alexander Gololobov
52efa7c286 style fix 2024-04-12 18:49:09 +02:00
Alexander Gololobov
69bc0b9176 Stream chunks from system.remote_data_paths 2024-04-12 18:33:58 +02:00
Alexander Tokmakov
d510c3ac55
Merge pull request #62266 from ClickHouse/cannot_allocate_thread
Add fault injection for "Cannot allocate thread"
2024-04-12 14:40:42 +00:00
Nikita Taranov
17315e53b8
Merge pull request #62577 from ClickHouse/revert-61551-better-marks-loading
Revert "More optimal loading of marks"
2024-04-12 13:00:20 +00:00
avogar
cae7cbf65c Better function name 2024-04-12 14:26:18 +02:00
Kruglov Pavel
eaa436ae9e
Update src/Storages/StorageS3.cpp
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2024-04-12 14:23:39 +02:00
Alexander Tokmakov
b5ff1c0a6e
Merge branch 'master' into cannot_allocate_thread 2024-04-12 13:35:14 +02:00
helifu
a52d77b625 Add a test case 2024-04-12 18:23:15 +08:00
Raúl Marín
1ae8a9fc6f
Merge pull request #62180 from Algunenano/i35215
Add test for #35215
2024-04-11 22:16:21 +00:00