Commit Graph

6076 Commits

Author SHA1 Message Date
Nicolae Vartolomei
9a02061d9c
Rewrite part movement between shards logic and add kill support
See https://github.com/ClickHouse/ClickHouse/pull/24585#issuecomment-857735081
for extra context about the current implementation.
2021-09-17 18:11:32 +01:00
Maksim Kita
85a4d4bb50 Added user defined executable functions to system.functions 2021-09-17 18:43:00 +03:00
Maksim Kita
de20e04dfd Added executable user defined functions 2021-09-17 18:42:59 +03:00
feng lv
5f97cad9a4 fix 2021-09-17 15:32:01 +00:00
alesapin
4adc4e9152
Merge pull request #28817 from ClickHouse/fix_part_checker
Fix rare replicas diverge
2021-09-17 18:06:27 +03:00
Nicolae Vartolomei
0381c634d4
Add support for user defined identifier on log entries
Sometimes we want to push a log entry once and only once. Because it is
not possible to create a sequential node in ZooKeeper and store its name
to a well known location in the same transaction we'll do it in the
other order. First somehow generate a unique identifier, then submit a
log entry with that identifier. Later, we can search through log entries
using the identifier we provided to find the node.

Required for part movement between shards.
2021-09-17 15:32:35 +01:00
Nicolae Vartolomei
c428f433c3
Use do-while control loops for waiting on log processing
This allows to use the same functions with very short timeouts while
ensuring that the actual state is checked at least once instead of
timing out before even looking at at ZK at least once.
2021-09-17 15:32:35 +01:00
Vladimir Chebotarev
db516e8c91
Removed sub-optimal mutation notifications in StorageMergeTree when merges are still going (#27552)
* Removed redundand mutation notifications in `StorageMergeTree` when merges are still going.
2021-09-17 16:19:36 +03:00
Nikolai Kochetov
a8c3b02598 Merge branch 'master' into rewrite-pushing-to-views 2021-09-17 15:38:11 +03:00
Nikolai Kochetov
6e0ac024a2 Maybe fix some build. 2021-09-17 15:05:54 +03:00
mergify[bot]
c23f1fc160
Merge branch 'master' into fix_part_checker 2021-09-17 07:23:12 +00:00
PHO
5a4985fe27 Do not initialize std::pair with a std::tuple<T1, T2>
GCC/libstdc++ does not allow this and emits a compilation error. The standard does not say they are supposed to be interchangeable.
2021-09-17 11:12:05 +09:00
Nikita Mikhaylov
c52b8ec083
Introduced MergeTask and MutateTask (#25165)
Introduced MergeTask and MutateTask
2021-09-17 00:19:58 +03:00
Kseniia Sumarokova
e9d44d0848
Merge pull request #28797 from kssenii/rabbit-fix
Rewrite StorageRabbitMQ a little
2021-09-16 23:58:51 +03:00
Nikolai Kochetov
341553febd Fix build. 2021-09-16 20:40:42 +03:00
alesapin
2d9fa85c0a
Merge pull request #28889 from azat/fix-mutation-wait
Fix waiting for mutation with mutations_sync=2
2021-09-16 19:10:56 +03:00
alesapin
606ab6d3e4 Typo fix 2021-09-16 18:40:25 +03:00
alesapin
8930a0d2bd More precise initialization 2021-09-16 18:39:11 +03:00
alesapin
b4cbc86164 Fix bug 2021-09-16 17:59:55 +03:00
kssenii
7b068317c1 Fix build 2021-09-16 13:55:18 +00:00
kssenii
432ca1ed93 Fix tests 2021-09-16 10:46:43 +00:00
kssenii
1650c92407 Better 2021-09-16 11:38:26 +03:00
Nikolai Kochetov
e616732743 Small refactoring. 2021-09-15 22:35:48 +03:00
kssenii
221c09589c Review fixes 2021-09-15 21:11:49 +03:00
kssenii
489a92c067 Review fixes 2021-09-15 18:36:49 +03:00
Anton Popov
f6191b98e7 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-15 17:47:22 +03:00
feng lv
dc318000e4 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-15 14:12:49 +00:00
Nikolay Degterinsky
24e515df05 Merge branch 'master' into query_parameters 2021-09-15 16:15:50 +03:00
Kruglov Pavel
8a67c3cf44
Merge pull request #28636 from amosbird/nullable-index-fix
Fix nullable/lowcardinality primary key with constant conversion
2021-09-15 15:56:19 +03:00
kssenii
84c8757049 Merge branch 'master' of github.com:ClickHouse/ClickHouse into named-collections 2021-09-15 12:28:31 +03:00
kssenii
710c8d12dd Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-15 12:28:09 +03:00
Kseniia Sumarokova
fbc048b2bf
Merge branch 'master' into rabbit-fix 2021-09-15 12:11:57 +03:00
kssenii
32c9f76ddc Some fixes 2021-09-15 09:09:24 +00:00
Anton Popov
fc17936c12 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-14 23:02:30 +03:00
mergify[bot]
0cbd4eda60
Merge branch 'master' into fix_part_checker 2021-09-14 19:44:11 +00:00
Nikolai Kochetov
b997214620 Rename QueryPipeline to QueryPipelineBuilder. 2021-09-14 20:48:18 +03:00
Nikolai Kochetov
7fc830ae2b Rename QueryPipeline to QueryPipelineBuilder. 2021-09-14 19:28:41 +03:00
alesapin
5a755d1e7c
Merge pull request #29009 from ClickHouse/improve_error_message
Better error message on concurrent alters
2021-09-14 17:21:26 +03:00
mergify[bot]
4993c7c527
Merge branch 'master' into fix_part_checker 2021-09-14 14:13:52 +00:00
Nikolai Kochetov
0e267c50b4 Merge branch 'master' into rewrite-pushing-to-views 2021-09-14 16:13:54 +03:00
Nikita Mikhaylov
58f2504a56 Update ya.make 2021-09-14 12:00:32 +00:00
alesapin
797df22418 Fix build 2021-09-14 14:45:33 +03:00
alesapin
76b8d9d85f Better error message on concurrent alters 2021-09-14 13:57:05 +03:00
alesapin
9441378b39 Add logs to queue because I cannot understand anything without them 2021-09-14 12:04:11 +03:00
feng lv
c58e232385 fix conflict 2021-09-14 06:41:57 +00:00
Kseniia Sumarokova
d3e604e14b
Merge pull request #28603 from kssenii/fix-web-disk-2
Some fixes for static files disk
2021-09-14 08:24:24 +03:00
feng lv
19ed9c6dbc fix 2021-09-14 04:50:18 +00:00
feng lv
94ba18e050 fix 2021-09-14 03:15:05 +00:00
Nikolai Kochetov
95b00f8fd4 Fix some live view tests. 2021-09-13 19:23:56 +03:00
feng lv
cfa92a0c1e fix
fix
2021-09-13 15:09:02 +00:00
mergify[bot]
c54434084f
Merge branch 'master' into fix_part_checker 2021-09-13 13:19:34 +00:00
alesapin
1d05fab295
Merge pull request #28864 from ClickHouse/fix_replace_range_drop_part_reordering
Fix reordering of REPLACE_RANGE and DROP PART
2021-09-13 15:11:29 +03:00
Nikolay Degterinsky
f3f23cb905 Fix build 2021-09-13 13:17:29 +03:00
Nikolay Degterinsky
84aea776c2 Merge branch 'master' into query_parameters 2021-09-13 12:54:48 +03:00
alesapin
fa8b698b7e Merge branch 'fix_part_checker' of github.com:ClickHouse/ClickHouse into fix_part_checker 2021-09-13 11:00:41 +03:00
alesapin
ab41384f63 Move queue initialization to restarting thread 2021-09-13 11:00:07 +03:00
alesapin
91e10adca5 Merge branch 'master' into fix_part_checker 2021-09-13 10:19:04 +03:00
kssenii
9ec6a9b4c9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-web-disk-2 2021-09-13 08:32:34 +03:00
feng lv
9d9ba56808 add test
remove unneeded code
2021-09-13 04:51:54 +00:00
feng lv
bd1990a67c fix test and restrict path 2021-09-13 03:44:12 +00:00
Vitaly Baranov
81b8062f3c
Merge pull request #28683 from vitlibar/allow-macros-in-rabbitmq-settings
Expand macros in RabbitMQ settings
2021-09-13 03:21:18 +03:00
feng lv
aa99516380 fix
fix
2021-09-12 16:43:34 +00:00
kssenii
0978c8baab Fix tests 2021-09-12 16:55:37 +03:00
Vitaly Baranov
51dbedafd9 Expand macros in RabbitMQ settings. 2021-09-12 16:42:03 +03:00
alexey-milovidov
cdcfdbec7e
Merge pull request #28873 from CurtizJ/fix-subcolumns-compact-parts
Fix reading of subcolumns from compact parts
2021-09-12 15:54:07 +03:00
alexey-milovidov
ea13a8b562
Merge pull request #28659 from myrrc/improvement/tostring_to_magic_enum
Improving CH type system with concepts
2021-09-12 15:26:29 +03:00
kssenii
4e5958d721 Merge branch 'master' of github.com:ClickHouse/ClickHouse into rabbit-fix 2021-09-12 13:56:09 +03:00
Kseniia Sumarokova
6cc4ad97c3
Update WriteBufferToRabbitMQProducer.h 2021-09-12 00:35:18 +03:00
kssenii
453bd27c0a Review fixes 2021-09-11 20:40:18 +03:00
kssenii
ff602c1fdd Fix build check 2021-09-11 19:29:23 +03:00
mergify[bot]
267e56df8c
Merge branch 'master' into fix-web-disk-2 2021-09-11 15:45:43 +00:00
Azat Khuzhin
2f1a58f4b0 Fix waiting for mutation with mutations_sync=2
CI: https://clickhouse-test-reports.s3.yandex.net/28827/c6b9816d45e3e8255eb1aee9b9059dfe7397fdab/functional_stateless_tests_(thread).html#fail1
2021-09-11 15:23:00 +03:00
Azat Khuzhin
f40ab891eb Support tuple with zero/one arguments in transformQueryForExternalDatabase() 2021-09-11 14:15:27 +03:00
Azat Khuzhin
0c2f612a86 gtest_transform_query_for_external_database: add test with multiple columns in IN 2021-09-11 14:15:27 +03:00
Azat Khuzhin
ef161f10f7 gtest_transform_query_for_external_database: print input query 2021-09-11 14:15:27 +03:00
Alexey Milovidov
7e084304fb Skip "no data" exception when reading thermal sensors 2021-09-11 10:03:06 +03:00
Mike Kot
c4385a2c40 Simplifying exception messages 2021-09-11 00:40:18 +02:00
Anton Popov
8999a83320 add comment 2021-09-10 20:22:28 +03:00
feng lv
810d180ce2 fix 2021-09-10 17:21:03 +00:00
Anton Popov
a63887413c fix reading of subcolumns from compact parts 2021-09-10 20:19:18 +03:00
Nikolai Kochetov
3a9d88fbc9 Fix more tests. 2021-09-10 17:52:24 +03:00
Anton Popov
0bb74f8eaf
Merge pull request #28762 from CurtizJ/fix-nested-1
Fix usage of nested columns with non-array columns with the same prefix [2]
2021-09-10 17:34:43 +03:00
Alexander Tokmakov
518f542c3e fix reordering of REPLACE_RANGE and DROP PART 2021-09-10 17:32:45 +03:00
alesapin
d1dea0e95f
Update src/Storages/MergeTree/ReplicatedMergeTreePartCheckThread.cpp
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
2021-09-10 15:32:24 +03:00
Maksim Kita
43102e8427
Merge pull request #28833 from kitaisreal/executable-added-option-send-chunk-header
Executable added option send_chunk_header
2021-09-10 14:44:34 +03:00
kssenii
ba1534f1df Fix checks 2021-09-10 14:16:01 +03:00
Anton Popov
5cff615eca Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-10 13:40:48 +03:00
kssenii
f26f64993a Rewrite StorageRabbitMQ a bit 2021-09-10 13:35:24 +03:00
Nikolai Kochetov
083b422e87 Try to fix build. 2021-09-10 13:18:04 +03:00
Maksim Kita
2e535cf6fd
Merge pull request #28835 from kitaisreal/shell-command-source-fix-logging
ShellCommandSource fix logging
2021-09-10 12:27:19 +03:00
Maksim Kita
21d33c3c2e ShellCommandSource fix logging 2021-09-10 01:28:22 +03:00
Maksim Kita
b1edf77904 Executable added option send_chunk_header 2021-09-10 01:04:52 +03:00
Maksim Kita
25a27978e6
Merge pull request #28818 from ClickHouse/remove_incorrect_code
Remove incorrect code and check what will happen
2021-09-10 00:49:36 +03:00
alexey-milovidov
2236a5df98
Merge pull request #28085 from myrrc/improvement/merge-tree-part-opt-parse
optional<> semantics for parsing MergeTreePartInfo and DetachedPartInfo
2021-09-10 00:04:03 +03:00
tavplubix
e419614d32 remove incorrect code 2021-09-09 21:31:15 +03:00
Nikolai Kochetov
f569a3e3f7 Merge branch 'master' into rewrite-pushing-to-views 2021-09-09 20:30:23 +03:00
alesapin
59edf6b5f6 Better logic on part checker 2021-09-09 18:19:12 +03:00
Anton Popov
abebce2f18 fix kafka 2021-09-09 17:48:01 +03:00
kssenii
0c013ed91b Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-web-disk-2 2021-09-09 15:26:36 +03:00
kssenii
904cf74159 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-09 15:26:20 +03:00
kssenii
00be148fce Merge branch 'master' of github.com:ClickHouse/ClickHouse into named-collections 2021-09-09 15:26:09 +03:00
Nikolai Kochetov
13eb93a9c0
Merge pull request #28700 from amosbird/projection-fix16
Fix crash on exception with projection aggregate
2021-09-09 15:24:05 +03:00
Anton Popov
8e5b3b2f6c Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-09 15:12:34 +03:00
kssenii
24010689e6 Fix possible throw from shutdown 2021-09-09 15:08:18 +03:00
Nikolai Kochetov
abfb1d20ea
Merge pull request #25734 from vdimir/join-arrayjoin-type-cast
Move join type inference to ExpressionAnalyzer from syntax stage + small refactor
2021-09-09 14:38:43 +03:00
Anton Popov
2ccdb6c22d fix clang-tidy 2021-09-09 12:40:26 +03:00
tavplubix
341a6c51d6
Merging #24866 (#28691)
* Add StorageSystemISTables.cpp/.h

* Another attempt

* Columns and Views

* Add information schema db and fix information schema 'tables' table

* fix build

* remove copy-paste, add views to system tables

* add test

* fix

* fix_tests

Co-authored-by: Damir Petrov <petrovdamir2235@gmail.com>
Co-authored-by: Damir Petrov <0442a403@verstehen.sas.yp-c.yandex.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-09 12:37:51 +03:00
kssenii
e9721804b6 Fix tests 2021-09-09 12:34:47 +03:00
robot-clickhouse
fc4f119417 Auto version update to [21.11.1.1] [54456] 2021-09-09 12:03:29 +03:00
Nikita Mikhaylov
4db5062d6b
Merge pull request #28374 from nikitamikhaylov/global-merge-executor
Introduced global executor for background MergeTree-related operations
2021-09-09 11:30:21 +03:00
alesapin
407c0bbb56
Merge pull request #28734 from ClickHouse/fix_race_on_mutation_pointer
Fix race on mutation_pointer update
2021-09-09 10:36:09 +03:00
kssenii
f26da04cdf Fix checks 2021-09-09 09:53:58 +03:00
Amos Bird
91293c7449
Fix crash on exception with projection aggregate 2021-09-09 10:43:56 +08:00
kssenii
bed2688dad Review fixes 2021-09-09 01:25:08 +03:00
Nikita Mikhaylov
f12504b002 Fix stupid race 2021-09-08 20:30:54 +00:00
kssenii
797f858bc6 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-08 22:52:48 +03:00
kssenii
41bc68e82e Tests, url table function 2021-09-08 22:28:22 +03:00
alexey-milovidov
8588e4d9bb
Merge pull request #28708 from azat/detach_not_byte_identical_parts
Implement detach_not_byte_identical_parts
2021-09-08 22:12:52 +03:00
Anton Popov
9816014f6c fix nested and scalar columns with dot, which is missed in part 2021-09-08 21:42:34 +03:00
Nikolai Kochetov
999a4fe831 Fix other tests. 2021-09-08 21:29:38 +03:00
kssenii
6108a4139c Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-web-disk-2 2021-09-08 20:54:07 +03:00
kssenii
ab6937ee45 Merge branch 'master' of github.com:ClickHouse/ClickHouse into named-collections 2021-09-08 20:43:37 +03:00
Nikita Mikhaylov
1416b1ccba
Update MergeTreeBackgroundExecutor.cpp 2021-09-08 20:21:25 +03:00
Nikita Mikhaylov
dae9a01b4b Fix build 2021-09-08 16:13:32 +00:00
mergify[bot]
64fb384656
Merge branch 'master' into global-merge-executor 2021-09-08 13:15:38 +00:00
Nikita Mikhaylov
3b7fa06540 Review fixes 2021-09-08 12:42:03 +00:00
alesapin
f8a6dfb0c4 Fix race on mutation_pointer update 2021-09-08 14:37:16 +03:00
Nikita Mikhaylov
ed37a22c37 Delete debug print 2021-09-08 09:35:18 +00:00
Nikolai Kochetov
0a1c3d701f
Merge pull request #28717 from DimasKovas/fix_arcadia_build_2021_09_08
Regenerate ya.make
2021-09-08 11:13:32 +03:00
Vladimir C
70fbc85768
Merge pull request #28686 from ljcui/distributed_coredump
Fix coredump in creating distributed table
2021-09-08 10:52:56 +03:00
Dmitrii Kovalkov
5e133a3cc6 Run generate-ya-make.sh 2021-09-08 07:58:22 +03:00
Nikita Mikhaylov
6062dd0021 Better 2021-09-08 00:21:21 +00:00
Azat Khuzhin
db0767a194 Implement detach_not_byte_identical_parts
Maybe useful for further analysis of non byte-identical parts.
2021-09-07 23:29:57 +03:00
mergify[bot]
771ae92c8e
Merge branch 'master' into global-merge-executor 2021-09-07 14:52:33 +00:00
Nikita Mikhaylov
231f64cf37 Fix unit test 2021-09-07 13:51:30 +00:00
Nikita Mikhaylov
9b38248e64 Remove scheduler thread 2021-09-07 13:13:23 +00:00
Nikita Mikhaylov
8a0765c60d Review fixes (partially) 2021-09-07 12:45:39 +00:00
kssenii
3deb9a0ecb s3, url, http headers 2021-09-07 14:17:25 +03:00
Vitaly
69604eab3f
Add Settings.Names, Settings.Values aliases for system.processes table 2021-09-07 14:05:55 +03:00
ZhiYong Wang
978dd19fa2 Fix coredump in creating distributed table 2021-09-07 19:05:26 +08:00
mergify[bot]
e9fbdec13a
Merge branch 'master' into improvement/merge-tree-part-opt-parse 2021-09-07 09:52:24 +00:00
Maksim Kita
7a4a0b0ede
Merge pull request #28474 from azat/mysql-connection_no_block
Introduce connection_wait_timeout for MySQL engine.
2021-09-07 12:28:02 +03:00
Kseniia Sumarokova
8e8b15edd7
Merge pull request #28665 from kssenii/revert
Revert  #28082
2021-09-07 09:43:02 +03:00
Nikolay Degterinsky
22f59e1714 Add support for table and database query parameters 2021-09-07 01:19:02 +03:00
Nikita Mikhaylov
cfe2207be3 Better 2021-09-06 22:07:41 +00:00
Kseniia Sumarokova
9e496910a0
Merge pull request #28614 from kssenii/materialized-postgresql-2
MaterializedPostgreSQL: add solution to survive postgres primary failover
2021-09-06 22:31:15 +03:00
kssenii
7bea8200d8 Revert "Merge pull request #28082 from zhongyuankai/add-system-of-table_views"
This reverts commit e5bcfba89e, reversing
changes made to d77f243651.
2021-09-06 19:20:33 +00:00
Nikita Mikhaylov
324ab97f50 Fix gcc build 2021-09-06 16:44:46 +00:00
Nikita Mikhaylov
7c39f84a5e Merge upstream/master into global-merge-executor (using imerge) 2021-09-06 15:37:18 +00:00
Mike Kot
8e9aacadd1 Initial: replacing hardcoded toString for enums with magic_enum 2021-09-06 16:24:03 +02:00
Nikita Mikhaylov
17d65b3d7b Allow allocations 2021-09-06 14:04:37 +00:00
Nikita Mikhaylov
ea0fbf81af Renaming 2021-09-06 12:01:16 +00:00
Nikita Mikhaylov
0249015515 added priority queue 2021-09-06 11:37:51 +00:00
Nikolai Kochetov
2178ed21df
Merge pull request #28560 from amosbird/projection-fix15
Fix wrong header of minmax_count projection
2021-09-06 13:00:44 +03:00
mergify[bot]
8eba5f29a1
Merge branch 'master' into improvement/merge-tree-part-opt-parse 2021-09-06 09:53:46 +00:00
Dmitrii Kovalkov
181bf0dbd6 Fix arcadia build 2021-09-06 11:11:45 +03:00
Amos Bird
8fac97692a
Fix nullable primary key with constant conversion 2021-09-06 15:11:37 +08:00
kssenii
7b8101f289 Minor change 2021-09-06 09:57:05 +03:00
feng lv
a22a0d6c68 fix style 2021-09-05 13:47:20 +00:00
feng lv
580b047d96 fix 2021-09-05 13:45:08 +00:00
feng lv
b97faf8b25 fix style 2021-09-05 12:12:04 +00:00
feng lv
dfea640c67 fix 2021-09-05 11:41:13 +00:00
feng lv
3c166df8ea fix minor typo 2021-09-05 07:25:52 +00:00
feng lv
09bc3d723a refactor some code 2021-09-05 06:32:32 +00:00
kssenii
d0113743c9 Merge branch 'master' of github.com:ClickHouse/ClickHouse into materialized-postgresql 2021-09-05 01:07:31 +03:00
kssenii
a1e4d2e230 Fix style check and pvs check 2021-09-05 01:03:15 +03:00
kssenii
5cb046dc10 Merge branch 'master' of github.com:ClickHouse/ClickHouse into named-collections 2021-09-04 21:40:42 +03:00
Maksim Kita
311110e36b
Merge pull request #28518 from kitaisreal/executable-pool-storage
Added ExecutablePool storage
2021-09-04 21:09:07 +03:00
feng lv
595005eb21 refactor some code 2021-09-04 17:04:35 +00:00
kssenii
ac2d9a73a8 User managed slots 2021-09-04 14:49:40 +03:00
kssenii
97e0a0310a Slightly better 2021-09-04 12:02:07 +03:00
Kseniia Sumarokova
04b26d26bf
Merge pull request #28428 from kssenii/fix-database-ordinary-test
Fix 01457_create_as_table_function_structure
2021-09-04 11:07:42 +03:00
Anton Popov
66173d2cc0 fix debug assert in table asynchronous_inserts 2021-09-04 04:11:37 +03:00
Nikita Mikhaylov
3eec8a3c2f Use boost::circular_buffer 2021-09-03 22:15:20 +00:00
kssenii
6ee94c923f Fix 2021-09-04 00:51:11 +03:00
Anton Popov
59128412ea Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-03 22:17:11 +03:00
Anton Popov
f91f8c1e8f add more tests with async inserts 2021-09-03 20:31:29 +03:00
Nikolai Kochetov
66a76ab70f Rewrite PushingToViewsBlockOutputStream part 6 2021-09-03 20:29:36 +03:00
Alexander Tokmakov
13466a7cc3 minor fix 2021-09-03 20:06:38 +03:00
Kruglov Pavel
f559c34113
Merge pull request #28302 from amosbird/binaryconstantwrap
Always monotonic for non-zero division
2021-09-03 20:02:54 +03:00
Kseniia Sumarokova
2486b6d53c
Update StorageTableFunction.h 2021-09-03 19:52:43 +03:00
Anton Popov
7d57aba4f9 add system table asynchronous_inserts 2021-09-03 19:46:09 +03:00
Kseniia Sumarokova
5c8e634584
Update StorageTableFunction.h 2021-09-03 17:46:26 +03:00
Anton Popov
c9a0cc5ce9 fix race on table schema in insert-select 2021-09-03 17:23:21 +03:00
Nikita Mikhaylov
26ab6ebc0a finalize in destructor 2021-09-03 14:20:34 +00:00
Kseniia Sumarokova
8c5acc371a
Merge pull request #28365 from kssenii/rabbitmq-ssl
Allow ssl connection for rabbitmq
2021-09-03 16:53:28 +03:00
kssenii
a4abcae97e Merge branch 'master' of github.com:ClickHouse/ClickHouse into named-collections 2021-09-03 16:33:26 +03:00
kssenii
a5f56bb588 Some other 2021-09-03 16:25:40 +03:00
Nikita Mikhaylov
b867eabe73 Use Poco::Event 2021-09-03 13:02:49 +00:00
alesapin
dd7493d871
Merge pull request #27038 from excitoon-favorites/altermaterializecolumn
`ALTER TABLE ... MATERIALIZE COLUMN`
2021-09-03 15:50:52 +03:00
Nikita Mikhaylov
218f0adca7 Merge upstream/master into global-merge-executor (using imerge) 2021-09-03 12:29:48 +00:00
Nikita Mikhaylov
ca7adb76b9 Owning future 2021-09-03 12:27:49 +00:00
Mike Kot
1f148719ce Review fixes 2021-09-03 13:33:40 +02:00
Amos Bird
bb87d01579
Fix wrong header of minmax_count projection 2021-09-03 18:49:01 +08:00
Maksim Kita
af7220b6aa Updated ShellCommandSource 2021-09-03 13:00:40 +03:00
feng lv
e2cadd2ab1 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-03 09:13:43 +00:00
kssenii
fbd2f40b05 Fix 2021-09-03 09:04:46 +00:00
kssenii
f17d1bc7a5 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into materialized-postgresql 2021-09-03 09:03:48 +00:00
kssenii
6efbee320b Done MySQL 2021-09-03 11:30:28 +03:00
Nikita Mikhaylov
d777c6cd70 Better [2] 2021-09-03 00:51:12 +00:00
Nikita Mikhaylov
60765b8c6e Better 2021-09-03 00:45:19 +00:00
Nikita Mikhaylov
292a24abe8 Merge upstream/master into global-merge-executor (using imerge) 2021-09-03 00:34:24 +00:00
Nikita Mikhaylov
9257188512 Comments 2021-09-03 00:28:29 +00:00
Nikita Mikhaylov
7baad6adde Fix build 2021-09-02 22:56:03 +00:00
Nikita Mikhaylov
cc7c221fad Own PriorityQueue + prettifying the code 2021-09-02 21:31:32 +00:00
Azat Khuzhin
ed70ed6f71 Introduce connection_no_wait setting for MySQL engine.
This will allow to avoid superfluous sleep during query execution, since
this not only not desired behavoiur, but also may hang the server, since
if you will execute enough queries that will use MySQL database but will
not allow enough connections (or your MySQL server is too slow) then you
may run out of threads in the global thread pool.

Also note that right now it is possible to get deadlock when the mysql
pool is full, consider the following scenario:

- you have m1 and m2 mysql tables
- you have q1 and q2 queries, bot queries join m1 and m2
- q1 allocated connection for m1 but cannot allocate connection for m2
- q2 allocated connection for m2 but cannot allocate connection for m1
- but to resolve the lock one should give up on the locking while it is not possible right now...

And then you got no free threads and this:

    # grep -h ^202 /proc/$(pgrep clickhouse-serv)/task/*/syscall  | cut -d' ' -f2 | sort | uniq -c | sort -nr | head
       1554 0x7ffb60b92fe8 # mutex in mysqlxx::PoolWithFailover::get
       1375 0x7ffb9f1c4748 # mutex in ::PoolEntryHelper::~PoolEntryHelper from DB::MultiplexedConnections::invalidateReplica
       1160 0x7ffb612918b8 # mutex in mysqlxx::PoolWithFailover::get
         42 0x7ffb9f057984 # mutex in ThreadPoolImpl<std::__1::thread>::worker

    *NOTE: 202 is a `futex` with WAIT*

(Went with `syscall` because debugging 10k+ threads is not easy, and
eventually it may TRAP)
2021-09-02 22:23:37 +03:00
Nikita Mikhaylov
6624fa12ba deleted set 2021-09-02 18:49:37 +00:00
Nikita Mikhaylov
a6fe91ca47 get rid of half of allocations 2021-09-02 17:40:29 +00:00
alesapin
464b8167d1 Update comment 2021-09-02 18:29:26 +03:00
alesapin
ba78a737dc Fix detach/attach for ReplicatedVersionedCollapsingMergeTree after alter 2021-09-02 17:47:00 +03:00
Maksim Kita
abda2a636e Added ExecutablePool storage 2021-09-02 14:53:20 +03:00
alesapin
b592400e54
Merge pull request #28404 from ClickHouse/remove_outdated_settings
Remove obsolete settings for replicated fetches.
2021-09-02 14:03:12 +03:00
kssenii
7a45775f4f Complete postgres 2021-09-02 13:46:19 +03:00
Nikita Mikhaylov
7f21cd7f3d save 2021-09-02 10:39:27 +00:00
Nikolai Kochetov
5f0b1bc4e3
Merge pull request #26286 from amosbird/projection-improve2
Virtual projection for min max indices.
2021-09-02 13:03:30 +03:00
Maksim Kita
befb82e441
Merge pull request #28433 from kssenii/fix-materialized-postgresql
Fix cannot use non-ordinary table names in materialized postgresql
2021-09-02 09:49:33 +03:00
Anton Popov
5e421ab272 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-02 02:42:50 +03:00
kssenii
3423f8c984 Done postgres 2021-09-02 01:11:27 +03:00
feng lv
7513cbe9d6 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into filelog-engine 2021-09-01 15:38:07 +00:00
Kseniia Sumarokova
a67741b626
Merge pull request #28430 from kssenii/fix-startup
Do not allow create postgres storage with bad arguments
2021-09-01 17:29:14 +03:00
mergify[bot]
5d299fbdee
Merge branch 'master' into remove_outdated_settings 2021-09-01 14:07:48 +00:00
Kseniia Sumarokova
09c9dd489b
Update StorageRabbitMQ.cpp 2021-09-01 13:28:34 +03:00
alesapin
fd1581aee1 Fix style 2021-09-01 10:52:33 +03:00
Kseniia Sumarokova
bf9abc2888
Update StorageTableFunction.h 2021-09-01 10:46:41 +03:00
Nikita Mikhaylov
c7727f093d Merge upstream/master into global-merge-executor (using imerge) 2021-08-31 23:34:11 +00:00
Nikita Mikhaylov
ac5316ce98 Stress test + reworker executor 2021-08-31 23:20:23 +00:00
alexey-milovidov
4cc0b0298c
Merge pull request #28269 from amosbird/fixweirdcode
Better nullable primary key implementation
2021-09-01 00:48:45 +03:00
Kseniia Sumarokova
437c87fff3
Update StorageTableFunction.h 2021-09-01 00:06:10 +03:00
kssenii
445b6b34fc Fix 2021-08-31 20:58:00 +00:00
kssenii
f9592cae11 Fix 2021-08-31 22:24:58 +03:00
Nikita Mikhaylov
f471ed4506
Merge pull request #28037 from nikitamikhaylov/settings-s3-engine
Support `SETTINGS` clause for `S3` engine
2021-08-31 21:08:53 +03:00
Nikita Mikhaylov
28eff0e369 save 2021-08-31 18:07:24 +00:00
kssenii
185d29439b Fix 2021-08-31 20:51:42 +03:00
alesapin
2c7a51d816
Merge pull request #28366 from azat/remove-Temporary-part-fix-v2
Fix removing of parts in a Temporary state (v2 followup)
2021-08-31 19:13:15 +03:00
Nikita Mikhaylov
dbc950caa4 added a test 2021-08-31 14:54:24 +00:00
Nikolai Kochetov
5be05c2ef9 Rewrite PushingToViewsBlockOutputStream part 3. 2021-08-31 16:50:07 +03:00
Nikita Mikhaylov
e41d1cff1d Fix test 2021-08-31 12:54:45 +00:00
Nikita Mikhaylov
fcfda4b983 Fix tests and update ya.make 2021-08-31 12:54:45 +00:00
Nikita Mikhaylov
e5593f594d After rebase 2021-08-31 12:54:06 +00:00
Nikita Mikhaylov
ae241fc129 done 2021-08-31 12:54:06 +00:00
Mike Kot
4194ed2ec7 Merge remote-tracking branch 'upstream/master' into improvement/merge-tree-part-opt-parse 2021-08-31 14:35:14 +02:00
Nikita Mikhaylov
e39f9aabde delete useless file 2021-08-31 12:29:51 +00:00
alesapin
7223a32aac Followup 2021-08-31 15:29:33 +03:00
alesapin
9a3bbf44e3 Better description 2021-08-31 15:28:17 +03:00
vdimir
e8e26463bf
Change signature of ASTSelectQuery::arrayJoinExpressionList 2021-08-31 15:27:44 +03:00
vdimir
3443b3b5c4
Separate functoin buildJoinedPlan, minor refactoring 2021-08-31 15:27:44 +03:00
alesapin
921e51e061 Remove some obsolete settings for replicated fetches 2021-08-31 15:22:56 +03:00
Nikita Mikhaylov
8abee2480e src/ 2021-08-31 12:14:08 +00:00
Nikita Mikhaylov
3027efe860 after merge with master 2021-08-31 12:09:35 +00:00
Nikita Mikhaylov
f8d4f04294 Merge upstream/master into global-merge-executor (using imerge) 2021-08-31 11:52:11 +00:00
Nikita Mikhaylov
1adb9bfe23 better 2021-08-31 11:02:39 +00:00
alesapin
525999145e
Merge pull request #26791 from ClickHouse/async-reads
Experiment with asynchronous readers
2021-08-31 13:17:45 +03:00
Maksim Kita
4ebd0ae941
Merge pull request #28102 from ClickHouse/executable-table-function
Merging #23192
2021-08-31 12:00:50 +03:00
Nikolai Kochetov
8143c2e2b8
Merge pull request #28353 from ClickHouse/another-try-to-fix-BackgroundPoolTask-decrement
Another try to fix BackgroundPoolTask decrement.
2021-08-31 11:34:26 +03:00
Alexey Milovidov
ca6f6306f3 Merge branch 'master' into async-reads 2021-08-31 02:52:58 +03:00
Nikita Mikhaylov
c4416906c8 done 2021-08-30 19:37:03 +00:00
Maksim Kita
c9a0b1e28e Updated tests 2021-08-30 21:41:36 +03:00
Azat Khuzhin
2c0390f326 Fix removing of parts in a Temporary state (v2 followup)
CI reports [1]:

    <Fatal> : Logical error: 'Deleting data part all_0_0_0_3 doesn't exist'.
    ...
    <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeData.cpp:1254: DB::MergeTreeData::removePartsFinally() @ 0x1f94dffa in /usr/bin/clickhouse

  [1]: https://clickhouse-test-reports.s3.yandex.net/0/855a53ff8160c4638fe345b0d26e062804ba790a/stress_test_(debug).html#fail1

Follow-up for: #28221
2021-08-30 21:07:26 +03:00
Azat Khuzhin
0828548b88 Fix intersecting parts due to new part had been replaced with an empty part
AFAICS the problem is that some parts may be replaced with empty parts
(after #25820), and removed by the cleanup thread, due to it is empty
[1] (while it should not be deleted since it can download source part):

    <details>

    ```
    2021.08.18 20:11:22.687933 [ 341 ] {} <Trace> test_dpefxp.alter_table_1 (0758ca24-90e7-452c-8758-ca2490e7252c): Created log entry for mutation -1_115_115_0_146
    ...
    2021.08.18 20:11:22.707609 [ 22825 ] {} <Trace> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Executing log entry to mutate part -1_115_115_0 to -1_115_115_0_146
    2021.08.18 20:11:22.707643 [ 22825 ] {} <Debug> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Source part -1_115_115_0 for -1_115_115_0_146 is not ready; will try to fetch it instead
    ...
    2021.08.18 20:11:22.709397 [ 333 ] {} <Trace> test_dpefxp.alter_table_6 (ReplicatedMergeTreeQueue): Not executing log entry queue-0000001579 for part -1_115_115_0 because it is covered by part -1_115_115_0_146 that is currently executing.
    2021.08.18 20:11:22.718861 [ 22825 ] {} <Information> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): DB::Exception: No active replica has part -1_115_115_0_146 or covering part
    ...
    2021.08.18 20:11:27.936829 [ 295 ] {} <Information> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Going to replace lost part -1_115_115_0_146 with empty part
    2021.08.18 20:11:27.957839 [ 295 ] {} <Information> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Created empty part -1_115_115_0_146 instead of lost part
    ...
    2021.08.18 20:11:28.731635 [ 257 ] {} <Trace> test_dpefxp.alter_table_6 (ReplicatedMergeTreeCleanupThread): Cleared 190 old blocks from ZooKeeper
    ...
    2021.08.18 20:11:28.734507 [ 257 ] {} <Trace> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Will try to insert a log entry to DROP_RANGE for part: -1_115_115_0_146
    2021.08.18 20:11:28.779373 [ 22837 ] {} <Debug> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Removed 1 parts inside -1_115_115_0_146.
    ...
    2021.08.18 20:11:28.792600 [ 273 ] {} <Trace> test_dpefxp.alter_table_6 (766ae414-e113-4965-b66a-e414e1137965): Created log entry /clickhouse/tables/00993_system_parts_race_condition_drop_zookeeper_test_dpefxp/alter_table/log/log-0000003459 for merge -1_111_118_1
    ...
    2021.08.18 20:11:28.910988 [ 354 ] {} <Error> test_dpefxp.alter_table_7 (ReplicatedMergeTreeQueue): Code: 49. DB::Exception: Part -1_111_118_1 intersects next part -1_115_115_0_146. It is a bug. (LOGICAL_ERROR), Stack trace (when copying this message, always include the lines below):
    2021.08.18 20:11:31.282160 [ 305 ] {} <Error> test_dpefxp.alter_table_2 (ReplicatedMergeTreeQueue): Code: 49. DB::Exception: Part -1_111_118_1 intersects next part -1_115_115_0_146. It is a bug. (LOGICAL_ERROR), Stack trace (when copying this message, always include the lines below):
    ```

    </details>

  [1]: https://clickhouse-test-reports.s3.yandex.net/27752/59e3cb18f4e53c453951267b5599afeb664290d8/functional_stateless_tests_(release,_wide_parts_enabled).html
2021-08-30 21:05:46 +03:00
kssenii
335b6f12fd Fix 2021-08-30 20:59:03 +03:00
Kseniia Sumarokova
00bea71610
Merge pull request #25251 from kssenii/disk-over-web-server
ClickHouse over web server with static files
2021-08-30 16:18:59 +03:00
Nikolai Kochetov
ab45c412d0 Another try to fix BackgroundPoolTask decrement. 2021-08-30 15:45:32 +03:00
alesapin
531079c452
Merge pull request #28221 from azat/remove-Temporary-part-fix
Fix removing of parts in a Temporary state
2021-08-30 12:39:08 +03:00
Vladimir Chebotarev
de5daa22ab Revert "MATERIALIZE COLUMN xxx FINAL"
This reverts commit bf1430c1ec.
2021-08-30 11:50:26 +03:00
Vladimir Chebotarev
06476089d9 Fixed PVS report. 2021-08-30 11:50:01 +03:00
Vladimir Chebotarev
0d6e0181d6 MATERIALIZE COLUMN xxx FINAL 2021-08-30 11:49:59 +03:00
Vladimir Chebotarev
ce0850007f 1. Draw some circles. 2021-08-30 11:49:26 +03:00
alexey-milovidov
af709ab9a0
Merge pull request #28326 from DimasKovas/generate_ya_make_30_08_2021
Try to fix arcadia build (generate ya.make)
2021-08-30 11:28:02 +03:00
Dmitrii Kovalkov
9871ad70ff Exclude fuzzers 2021-08-30 11:12:25 +03:00
Dmitrii Kovalkov
8acf0fa16a run generate-ya-make 2021-08-30 10:57:40 +03:00
kssenii
378f4854da Rename 2021-08-30 05:50:08 +00:00
Maksim Kita
d88de46312 StorageExecutable added support for create 2021-08-29 23:19:05 +03:00
alexey-milovidov
77f26e8673
Merge pull request #28299 from amosbird/fixtmprowsource
Use real tmp file instead of predefined “rows_sources" for vertical merges
2021-08-29 21:49:59 +03:00
Alexey Milovidov
e4f3d97b52 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-29 21:42:14 +03:00
alexey-milovidov
3d3afbdb35
Merge pull request #28193 from amosbird/alterprimarykey2
Reserve protocol number for ALTER PRIMARY KEY.
2021-08-29 20:37:19 +03:00
Kseniia Sumarokova
7784f4ebb0
Merge pull request #28268 from infinivision/hdfs_namenode_ha
configable LIBHDFS3_CONF, refers to #8159
2021-08-29 12:25:42 +03:00
Amos Bird
9e7ae5dd6d
Use real tmp file instead of predefined one 2021-08-29 16:54:15 +08:00
kssenii
9d0444774a Fix tests 2021-08-29 11:50:03 +03:00
Maksim Kita
4aa2479ca1 Added support for multiple pipes 2021-08-28 22:47:59 +03:00
kssenii
378e1f74aa Fix tests 2021-08-28 19:51:04 +03:00
Amos Bird
4624bf70b0
Always monotonic for non-zero division 2021-08-28 23:33:18 +08:00
kssenii
fd621381c7 Allow modify some other settings 2021-08-28 17:36:27 +03:00
kssenii
a2b0996ac3 Dynamically remove tables 2021-08-28 17:35:59 +03:00
kssenii
174340074c Dynamically add tables complete 2021-08-28 17:35:44 +03:00
kssenii
4cd62227cf Almost done 2021-08-28 17:34:23 +03:00
Amos Bird
f2374a6916
Better nullable primary key implementation. 2021-08-28 17:48:28 +08:00
zhongyuankai
72e05cda1f Merge branch 'master' into add-system-of-table_views 2021-08-28 11:32:58 +08:00
Amos Bird
b68857d086
Simplify projection, add minmax_count projection. 2021-08-28 11:25:37 +08:00
Zhichang Yu
ef1994f420 set env LIBHDFS3_CONF, refers to ClickHouse#8159 2021-08-28 09:16:48 +08:00
tavplubix
e3b2586a02
Merge pull request #28274 from ClickHouse/revert-28054-mysql
Revert "Add test for #13398"
2021-08-28 04:04:10 +03:00
Alexey Milovidov
79e0433ba7 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-28 01:19:16 +03:00
alexey-milovidov
4eef445df9
Merge pull request #28266 from CurtizJ/fix-order-by-merge
Fix order by for `Merge` tables with `optimize_read_in_order`
2021-08-28 01:15:40 +03:00
tavplubix
c36fe210b8
Revert "Add test for #13398" 2021-08-27 21:07:10 +03:00
Anton Popov
89e1d1f64a fix order by for StorageMerge with optimize_read_in_order 2021-08-27 16:55:55 +03:00
Amos Bird
ce96b2c35a
bump 2021-08-27 20:44:26 +08:00
tavplubix
703101fe4d
Merge pull request #27931 from ClickHouse/wait_for_all_replicas_timeouts
Avoid too long waiting for inactive replicas
2021-08-27 14:31:36 +03:00
Nikolai Kochetov
34f4bd3e72
Merge pull request #28178 from amosbird/projection-fix14
Projection bug fixes and refactoring.
2021-08-27 11:47:46 +03:00
zhongyuankai
a7ee7621dd optimize code 2021-08-27 15:44:50 +08:00
Azat Khuzhin
19458a0c61 Fix removing of parts in a Temporary state
Parts in a temporary state is not exists in data_parts_by_info, so do
not try to search there and throw LOGICAL_ERROR in case of failure:

<details>

```
    02:45:49.037546 [ 5890 ] {} <Error> test_iy9rta.concurrent_kill_4 (526aa7c8-db2a-4f0e-926a-a7c8db2a9f0e): Code: 40. DB::Exception: Part all_0_0_0_1 from r11 has different columns hash. (CHECKSUM_DOESNT_MATCH) (version 21.10.1.7910 (official build)). Data after mutation is not byte-identical to data on another replicas. We will download merged part from replica to force byte-identical result.
    02:45:49.049422 [ 5890 ] {} <Trace> test_iy9rta.concurrent_kill_4 (526aa7c8-db2a-4f0e-926a-a7c8db2a9f0e): Trying to immediately remove part all_0_0_0_1 (state Temporary)
    02:45:49.060210 [ 5890 ] {} <Fatal> : Logical error: 'Part all_0_0_0_1 doesn't exist'.
    02:47:01.572508 [ 29208 ] {} <Fatal> BaseDaemon: (version 21.10.1.7910 (official build), build id: 9309CECED9A0D32CBB00BB8EC77B91456679868E) (from thread 5890) (no query) Received signal Aborted (6)
    ...
    02:47:06.815000 [ 29208 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeData.cpp:2593: DB::MergeTreeData::tryRemovePartImmediately(std::__1::shared_ptr<DB::IMergeTreeDataPart const>&&) @ 0x1f959e0d in /usr/bin/clickhouse
    02:47:06.816309 [ 29209 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeData.cpp:2593: DB::MergeTreeData::tryRemovePartImmediately(std::__1::shared_ptr<DB::IMergeTreeDataPart const>&&) @ 0x1f959e0d in /usr/bin/clickhouse
    02:47:09.455665 [ 29208 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1939: DB::StorageReplicatedMergeTree::tryExecutePartMutation(DB::ReplicatedMergeTreeLogEntry const&) @ 0x1f5f2bf6 in /usr/bin/clickhouse
    02:47:09.468738 [ 29209 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1939: DB::StorageReplicatedMergeTree::tryExecutePartMutation(DB::ReplicatedMergeTreeLogEntry const&) @ 0x1f5f2bf6 in /usr/bin/clickhouse
    02:47:11.776857 [ 29208 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1581: DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0x1f5e484c in /usr/bin/clickhouse
    02:47:11.904232 [ 29209 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1581: DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0x1f5e484c in /usr/bin/clickhouse
    02:47:13.941811 [ 29208 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:3176: DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18::operator() shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) const @ 0x1f65faa5 in /usr/bin/clickhouse
    02:47:14.477158 [ 29209 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:3176: DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18::operator() shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) const @ 0x1f65faa5 in /usr/bin/clickhouse
    02:47:16.475373 [ 29208 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>))(std::__1::forward<std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(fp0))) std::__1::__invoke<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65fa32 in /usr/bin/clickhouse
    02:47:16.970325 [ 29209 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>))(std::__1::forward<std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(fp0))) std::__1::__invoke<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65fa32 in /usr/bin/clickhouse
    02:47:18.979481 [ 29208 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:317: bool std::__1::__invoke_void_return_wrapper<bool>::__call<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplireeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogE x1f65f9f2 in /usr/bin/clickhouse
    02:47:19.450807 [ 29209 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:317: bool std::__1::__invoke_void_return_wrapper<bool>::__call<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplireeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogE x1f65f9f2 in /usr/bin/clickhouse
    02:47:21.055007 [ 29208 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::ry>)::$_18, bool (std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&)>::operator()(std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65f9b0 in /usr/bin/clickhouse
    02:47:23.546946 [ 413 ] {} <Fatal> Application: Child process was terminated by signal 6.
```

</details>

CI: https://clickhouse-test-reports.s3.yandex.net/0/4a8b82232c11512232df3ecdf4ffaec287116ad5/stress_test_(debug).html#fail1
2021-08-27 10:08:44 +03:00
Anton Popov
e8ac8e3454 execute asynchronous inserts separatly for each client 2021-08-27 06:00:12 +03:00
zhongyuankai
306da6f414 update system views test 2021-08-27 10:41:15 +08:00
Alexey Milovidov
46732e781f Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-27 01:57:48 +03:00
Mike Kot
1f3701d485 Disk empty name fix 2021-08-26 19:28:33 +02:00
Amos Bird
103e0abe1c
Reserve protocol number for ALTER PRIMARY KEY. 2021-08-26 22:08:58 +08:00
Kruglov Pavel
5bc332c40c
Merge pull request #28054 from kssenii/mysql
Add test for #13398
2021-08-26 16:39:43 +03:00
Kseniia Sumarokova
31afd7d09c
Merge pull request #28081 from kssenii/pg-conflict
Support `on conflict` for postgres engine
2021-08-26 16:30:30 +03:00
zhongyuankai
15cbd7470a StorageSystemViews bug fix 2021-08-26 20:54:04 +08:00
zhongyuankai
042d17531c system.views add columns type 2021-08-26 20:05:01 +08:00
Amos Bird
0169fce78e
Projection bug fixes and refactoring. 2021-08-26 19:09:31 +08:00
alesapin
bcaff65457
Merge pull request #28028 from ClickHouse/replicated-tree-attach-wip
Allow attaching parts with 'compatible' enum types
2021-08-26 13:50:29 +03:00
Ilya Yatsishin
5553a064be
Merge pull request #28139 from lthaooo/fix_prewhere_total_size_of_queried_columns_bug
Fix bug in MergeTreeWhereOptimizer
2021-08-26 10:42:23 +03:00
Anton Popov
6d3274c22c Merge remote-tracking branch 'upstream/master' into HEAD 2021-08-26 03:31:46 +03:00
Alexey Milovidov
7dd0146223 Fix error 2021-08-26 01:56:08 +03:00
Alexey Milovidov
3cb9cf7242 Merge branch 'master' of github.com:yandex/ClickHouse into async-reads 2021-08-26 01:55:46 +03:00
kssenii
0b66581de2 Fix build 2021-08-25 21:51:43 +00:00
Nikita Mikhaylov
ae7c8df0b9
Merge pull request #27872 from nikitamikhaylov/codecs-fuzzing
Add fuzzers for codecs
2021-08-26 00:17:01 +03:00
Maksim Kita
6ccdde4a88 Updated TableFunctionExecutable 2021-08-25 22:30:22 +03:00
Maksim Kita
2403686bb9
Merge pull request #28135 from amosbird/projection-improve3
Get rid of useless projection columns during merge
2021-08-25 22:14:38 +03:00
Mike Kot
407af64280 Merge remote-tracking branch 'upstream/master' into improvement/merge-tree-part-opt-parse 2021-08-25 18:24:43 +02:00
alesapin
eaa49f56dd
Merge pull request #27019 from lthaooo/materialize_ttl_recalculate_only
Improvement of Materialize TTL
2021-08-25 19:10:20 +03:00
Nikita Mikhaylov
43fb3098ae Deleted some unneded changes 2021-08-25 15:40:56 +00:00
Nikita Mikhaylov
2c09533c83 lower a binary size for compression fuzzers 2021-08-25 15:40:56 +00:00
Nikita Mikhaylov
ad4966f6d2 better 2021-08-25 15:40:56 +00:00
Nikita Mikhaylov
0615bf27d6
Merge pull request #27990 from nikitamikhaylov/fix-clang-tidy
Build fuzzers in CI
2021-08-25 18:33:41 +03:00
lthaooo
eecd5b21c9 fix total_size_of_queried_columns bug 2021-08-25 23:02:13 +08:00
Amos Bird
a6b2a6ee36
Get rid of useless projection columns during merge 2021-08-25 20:54:27 +08:00
zhongyuankai
64efa917d8 review system.views 2021-08-25 18:11:40 +08:00
zhongyuankai
52570b1c80 Merge branch 'master' into add-system-of-table_views 2021-08-25 15:59:23 +08:00
lthaooo
314ba1e682
Merge branch 'master' into materialize_ttl_recalculate_only 2021-08-25 10:56:24 +08:00
Alexey Milovidov
848c2ec23e Tuneable prefetch 2021-08-25 02:38:08 +03:00
Alexey Milovidov
fd27a2faef Remove imperfect code 2021-08-25 02:05:55 +03:00
Alexey Milovidov
7c1d0a3baf Progress on development 2021-08-25 01:24:47 +03:00
Alexey Milovidov
f7ca674b0c Progress on development 2021-08-25 01:07:06 +03:00
Alexey Milovidov
8f57216180 Progress on development 2021-08-25 00:45:58 +03:00
Alexey Milovidov
4d9ad3725d Merge branch 'master' into async-reads 2021-08-25 00:45:40 +03:00
Maksim Kita
5545959581 Updated StorageExecutable 2021-08-24 22:38:42 +03:00
Maksim Kita
016c7c74f8
Merge branch 'executable-table-function' into add-executable-table-function 2021-08-24 21:45:43 +03:00
Dmitry Novik
2da3893b1f refactor isCompatibleEnumTypes to remove PVS warning 2021-08-24 21:11:47 +03:00
Mike Kot
d621605954 Merge remote-tracking branch 'upstream/master' into improvement/merge-tree-part-opt-parse 2021-08-24 19:43:33 +02:00
Mike Kot
f85e2e027c Optional semantics for [Detached]MergeTreePartInfo 2021-08-24 19:43:09 +02:00
Maksim Kita
82ba24cd10 Merge branch 'master' into create-user-defined-lambda-function 2021-08-24 19:12:32 +03:00
tavplubix
0602d74a11
Merge pull request #28035 from ClickHouse/fix_replace_ranges_may_stuck
Fix race between REPLACE PARTITION and MOVE PARTITION
2021-08-24 17:49:57 +03:00
Vitaly Baranov
64f69462c6
Merge pull request #27921 from vitlibar/add-tests-for-field-init
Allow implicit cast bool to Field
2021-08-24 17:15:44 +03:00
Kseniia Sumarokova
5bbf5dacc5
Update src/Storages/StoragePostgreSQL.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2021-08-24 16:13:57 +03:00
kssenii
0ec716292c Postgres ON CONFLICT 2021-08-24 12:37:32 +00:00
OnePiece
17ba4c620e
Merge branch 'ClickHouse:master' into add-system-of-table_views 2021-08-24 20:20:24 +08:00
OnePiece
e9edabc3cb
Update attachSystemTables.cpp 2021-08-24 20:09:36 +08:00
OnePiece
d2919e98c7
Update attachSystemTables.cpp 2021-08-24 20:09:04 +08:00
OnePiece
29aa41577f
Create StorageSystemTableViews.h 2021-08-24 20:07:48 +08:00
OnePiece
ba594f41b9
Create StorageSystemTableViews.cpp 2021-08-24 20:07:08 +08:00
Dmitry Novik
1984940eb6 Update all StorageInMemoryMetadata::check overloads 2021-08-24 14:59:35 +03:00
mergify[bot]
ae22bab2c4
Merge branch 'master' into materialize_ttl_recalculate_only 2021-08-24 08:49:19 +00:00
kssenii
0d5000f917 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into mysql 2021-08-24 07:30:42 +00:00
kssenii
14b87feb27 Fix build 2021-08-24 07:30:33 +00:00
kssenii
b536653851 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-24 07:29:50 +00:00
Vladimir C
98acccbdcc
Merge branch 'master' into s3partitionedwrite 2021-08-24 10:03:57 +03:00
kssenii
5307d31924 Throw for alter and silence for drop 2021-08-23 23:48:53 +00:00
kssenii
962f415740 Add test and settings 2021-08-23 22:18:04 +00:00
Dmitry Novik
e78f9b3d4b code cleanup 2021-08-24 00:42:03 +03:00
Vitaly Baranov
63e8bc1f20 Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
Anton Popov
0db8b524f0
Merge pull request #27984 from BraulioVM/optimize/has-all-bloom-filter
Make `hasAll` filter condition leverage bloom filters
2021-08-23 22:19:50 +03:00
Alexander Tokmakov
d95131dd4a better check for alter partition version 2021-08-23 20:51:20 +03:00
Dmitry Novik
6dad70a1fb Add check whether enums have the same underlying type or not 2021-08-23 17:55:21 +03:00
Alexander Tokmakov
4a4a0b4823 fix 2021-08-23 16:32:07 +03:00
Dmitry Novik
ac2e9a27e6 Fixes #26672. Lower restrictions in StorageInMemoryMetadata::check. 2021-08-23 16:08:23 +03:00
Alexander Tokmakov
cc9c2fd63b make code better 2021-08-23 15:57:50 +03:00
Ilya Yatsishin
315a835c95
Merge pull request #28020 from qoega/fix-style 2021-08-23 15:48:41 +03:00
Yatsishin Ilya
17bb938541 fix style 2021-08-23 13:59:01 +03:00
mergify[bot]
95e9d517ff
Merge branch 'master' into fix-clang-tidy 2021-08-23 10:54:36 +00:00
Maksim Kita
2a6aa50d49 Merge branch 'master' into create-user-defined-lambda-function 2021-08-23 11:08:49 +03:00
alesapin
31b12b5240
Merge pull request #27787 from kafka1991/master
modify column datatype to Nullable(datatype) or Nullable(datatype) to Nullable(datatype) donot allways need mutations.
2021-08-23 10:35:39 +03:00
Amos Bird
a2256b1307
Dedicated Mark/Uncompressed cache for skip indices 2021-08-23 15:27:31 +08:00
Vitaly Baranov
89166a655a Init SettingFieldBool with true or false, not with 1 or 0. 2021-08-23 09:47:36 +03:00
feng lv
9f7785ffa9 fix conflict 2021-08-23 06:28:55 +00:00
vdimir
6fe63a80bc Fix validateKey/Bucket for S3 2021-08-23 09:22:15 +03:00
vdimir
6ba6577978 Do not allow slashes in bucket formatted from PARTITION BY 2021-08-23 09:22:15 +03:00
vdimir
c4c42b61c4 Validate uft8 in partition key from PARTITION BY for s3 2021-08-23 09:22:15 +03:00
Vladimir Chebotarev
f6cb82aba5 Minor fix. 2021-08-23 09:22:15 +03:00
Vladimir Chebotarev
e203c330c2 Validation. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
6e10d28c78 Fix. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
ea67849fd9 Typo. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
119172543b Better fix. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
0b75c66378 Revert "Update src/Storages/StorageS3.cpp "
This reverts commit bbbfe1891bfdc868878cfc8d52c254babd4ca181.
2021-08-23 09:22:14 +03:00
Vladimir C
067cc763cc Update src/Storages/StorageS3.cpp
StringRef in fmt::format throws `fmt::v7::format_error: cannot switch from manual to automatic argument indexing`
2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
d8bc601dbf Minor. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
4b1cc38056 Fixes. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
cebe1e7123 Style fix. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
b34f60ad46 Fixed find. 2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
be343766a6 Update src/Storages/StorageS3.cpp
Co-authored-by: Vladimir C <vdimir@yandex-team.ru>
2021-08-23 09:22:14 +03:00
Vladimir Chebotarev
24fcf152ed Minor fix. 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
5ce9e266b4 Less strict validation. 2021-08-23 09:22:13 +03:00
vdimir
4c9fb7ff58 Fix error code in StorageS3.cpp 2021-08-23 09:22:13 +03:00
vdimir
eb31b194b9 Add validation to insert partition by key to s3 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
d1efe3afa7 Review fixes. 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
e99433e094 Better functionality. 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
328213f5d9 Fixes. 2021-08-23 09:22:13 +03:00
Vladimir Chebotarev
1146efacff Partitioned writes for S3. 2021-08-23 09:22:13 +03:00
Vitaly Baranov
ff1fad8521 Use setSetting() with implicit conversion true/false -> Field. 2021-08-23 08:57:00 +03:00
kssenii
c5ee335c68 Fix tests 2021-08-22 21:41:09 +03:00
kssenii
14afb3c509 File progress for local fix 2021-08-22 20:33:55 +03:00
Nikita Mikhaylov
80ebc6ccea Done 2021-08-22 15:09:49 +00:00
Braulio Valdivielso
d48f6122e3 clean up implementation a bit 2021-08-22 10:06:30 +01:00
Braulio Valdivielso
e95563fb82 leverage bloom filter index for 'hasAll'
Fixes #26151. For now, this is a draft implementation. There is some
cleanup that can be done, but the new test is passing
2021-08-21 20:14:56 +01:00
Nikita Mikhaylov
cfa571cac4
Merge pull request #27895 from nikitamikhaylov/temporary_remove_yaml_fuzzer
Build fuzzers with clang-tidy
2021-08-21 16:51:31 +03:00
alexey-milovidov
5ac6a99542
Merge pull request #27927 from ClickHouse/fix_27832
Сheck cluster name before creating Distributed
2021-08-21 10:40:23 +03:00
Nikita Mikhaylov
f72457fa98 Lower the size of the binaries 2021-08-21 02:20:23 +00:00
kssenii
945e2c4ce5 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-20 18:01:23 +00:00
Ilya Yatsishin
624cb43f7f
Merge pull request #27885 from azat/kafka-write-assert
Fix incorrect assertion during writing to StorageKafka
2021-08-20 18:53:22 +03:00
Alexander Tokmakov
42378b5913 fix 2021-08-20 17:05:53 +03:00
Alexander Tokmakov
59eb3aa9a9 avoid too long waiting for inactive replicas 2021-08-20 15:59:57 +03:00
Alexander Tokmakov
8c6dd18917 check cluster name before creating Distributed 2021-08-20 14:55:04 +03:00
mergify[bot]
66c6a85211
Merge branch 'master' into master 2021-08-20 11:50:30 +00:00
Maksim Kita
5f2b28639f Merge branch 'master' into create-user-defined-lambda-function 2021-08-20 11:53:08 +03:00
Azat Khuzhin
b60e5ac801 Fix incorrect assertion during writing to StorageRabbitMQ 2021-08-20 07:14:20 +03:00
Azat Khuzhin
5947e54c1b Fix incorrect assertion during writing to StorageKafka
The problem it does not triggered in CI always because buffers was not
destroyed by that time.

Fixes: #26547
2021-08-19 22:07:20 +03:00
nvartolomei
c09c90125f
Merge branch 'master' into nv/last-queue-update-exception 2021-08-19 10:29:16 +01:00
Nikolai Kochetov
7dcff5c90e
Merge pull request #27742 from amosbird/projection-improvement3
Improve projection analysis.
2021-08-19 12:11:20 +03:00
alexey-milovidov
215385e4d0
Merge pull request #27794 from filimonov/kafka_null_messages
Avoid nullptr dereference during processing of NULL messages in Kafka for some formats
2021-08-19 11:25:07 +03:00
Nikolai Kochetov
3e44ef437e
Merge pull request #26639 from ClickHouse/fix-bad-cast
Fix bad cast
2021-08-19 11:17:26 +03:00
alesapin
0aec151719
Merge pull request #27808 from ClickHouse/fix_replicas_may_diverge
Fix a couple of bugs that may cause replicas to diverge
2021-08-19 09:58:07 +03:00
Maksim Kita
01682a86b3 Updated user defined functions implementation 2021-08-19 00:54:55 +03:00
Alexander Tokmakov
0ed046eb7b remove irrelevant comments 2021-08-18 15:33:11 +03:00
alexey-milovidov
bcfab277e7
Update ReadBufferFromKafkaConsumer.cpp 2021-08-18 15:25:54 +03:00
Nikolai Kochetov
a46fe11e2c Try fix test_mutations_with_merge_background_task 2021-08-18 13:30:02 +03:00
Alexander Tokmakov
09ff66da0e fix a couple of bugs that may cause replicas to diverge 2021-08-18 12:50:46 +03:00
Mikhail Filimonov
05d77d2873
Safer processing of NULL messages in Kafka for some formats 2021-08-18 11:26:57 +02:00
alesapin
5cc98c67a4 Fix 2021-08-18 11:56:18 +03:00
mergify[bot]
f11e396151
Merge branch 'master' into nv/last-queue-update-exception 2021-08-18 07:00:50 +00:00
vicgao
c16bd25399 modify column datatype to Nullable(datatype) or Nullable(datatype) to Nullable(datatype) donot allways need mutations. 2021-08-17 21:14:13 +08:00
Nikita Mikhaylov
cc8ad0a4e7
Merge pull request #27733 from Algunenano/i27620_take2
Refactor arrayJoin check on partition expressions
2021-08-17 15:57:16 +03:00
vicgao
b5610d9a83 modify column datatype to Nullable(datatype) or Nullable(datatype) to Nullable(datatype) donot allways need mutations. 2021-08-17 20:52:16 +08:00
Nikolai Kochetov
98eb619b4b
Merge pull request #23367 from Avogar/short-circuit
Implement short circuit function evaluation
2021-08-17 12:36:07 +03:00
Amos Bird
ea7dc495cf
Better code. 2021-08-17 12:32:49 +08:00
Raúl Marín
90f224807a Style 2021-08-16 17:31:37 +02:00
kssenii
bec34531bc Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-16 14:48:32 +00:00
Amos Bird
90881aab09
Better code style 2021-08-16 22:17:07 +08:00
Raúl Marín
3ec904a953 Only analyze if tuple has arguments 2021-08-16 14:47:41 +02:00
Amos Bird
b162a2b699
Improve projection analysis.
Remove duplicate index analysis and avoid possible invalid limit checks
during projection analysis.
2021-08-16 20:11:57 +08:00
Raúl Marín
34099bc196 Refactor arrayJoin check on partition expressions 2021-08-16 12:46:18 +02:00
Alexey Milovidov
d184b79bba Progress on async reads. 2021-08-16 03:00:32 +03:00
alexey-milovidov
4a36366925
Merge pull request #27648 from Algunenano/i27620
Disable arrayJoin on partition expressions
2021-08-16 02:53:36 +03:00
Alexey Milovidov
0cd3f25ba4 Merge remote-tracking branch 'origin/master' into async-reads 2021-08-16 02:41:01 +03:00
alexey-milovidov
76b0502482
Merge pull request #27690 from kitaisreal/remove-dense-hash-map-set
Removed DenseHashMap, DenseHashSet
2021-08-16 02:39:41 +03:00
Maksim Kita
5f5470c2cd Removed DenseHashMap, DenseHashSet 2021-08-15 13:32:56 +03:00
Alexey Milovidov
020beb885d Merge branch 'master' into async-reads 2021-08-15 12:08:19 +03:00
mergify[bot]
bf426cfb96
Merge branch 'master' into fix_intersecting_parts 2021-08-15 09:07:20 +00:00
alexey-milovidov
d88cf81d71
Merge branch 'master' into fix-bad-cast 2021-08-15 09:06:42 +03:00
mergify[bot]
353a324887
Merge branch 'master' into i27620 2021-08-15 02:32:26 +00:00
alexey-milovidov
ab4415a22b
Update MergeTreeData.cpp 2021-08-15 05:28:38 +03:00
kssenii
daac6323fa Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-14 13:15:04 +00:00
kssenii
200d75646a Fix 2021-08-13 20:58:03 +00:00
Alexander Tokmakov
c534363abe fix intersecting parts 2021-08-13 20:33:10 +03:00
Raúl Marín
73cb7d55ec Disable arrayJoin on partition expressions 2021-08-13 16:18:46 +02:00
mergify[bot]
319e5af6eb
Merge branch 'master' into short-circuit 2021-08-13 13:01:46 +00:00
Nikolai Kochetov
66fdb859f3
Merge pull request #27528 from amosbird/projection-fix12
Fix projection materialization with missing columns
2021-08-13 15:20:51 +03:00
Kseniia Sumarokova
0917488cec
Merge pull request #27382 from kssenii/cast-internal
add Cast internal function
2021-08-13 13:13:51 +03:00
Nikolai Kochetov
ad00aaa18c
Merge pull request #27575 from kitaisreal/removed-some-data-streams
Removed some data streams
2021-08-13 12:59:00 +03:00
Nikolai Kochetov
d207fbc699
Merge pull request #27152 from qoega/fix-access-gtest-in-arcadia
Fix arcadia src/Access gtest
2021-08-13 10:51:29 +03:00
alexey-milovidov
f20eae9a45
Merge pull request #27577 from ClickHouse/remove-streams-from-lv
Remove streams from lv
2021-08-13 03:01:33 +03:00
Nikolai Kochetov
224e0a547a Fix build. 2021-08-12 16:02:17 +03:00
Nikolai Kochetov
9c066d476e Fix tests. 2021-08-12 13:46:58 +03:00
Nikolai Kochetov
5e5a6ff654 Merge branch 'master' into qoega-fix-access-gtest-in-arcadia 2021-08-12 12:02:15 +03:00
mergify[bot]
80eaea1c51
Merge branch 'master' into short-circuit 2021-08-12 08:38:45 +00:00
Maksim Kita
124a87684f Removed some data streams 2021-08-11 23:39:01 +03:00
kssenii
dcc6f597dc Move templates from FunctionsConvertion 2021-08-11 19:09:51 +00:00
kssenii
7555fc19fd Revert "Move some templates"
This reverts commit 7f247becca.
2021-08-11 18:49:25 +00:00
Nikolai Kochetov
beed4c21a5 Use processors in Storage::watch 2021-08-11 20:28:54 +03:00
mergify[bot]
68a52fc065
Merge branch 'master' into projection-fix12 2021-08-11 17:08:04 +00:00
Alexander Kuzmenkov
8f9845722a
Merge pull request #27250 from azat/minmax-nullable-new-format
Add new index data skipping minmax index format for proper Nullable support
2021-08-11 13:56:16 +03:00
Nikolai Kochetov
81b85c30f7 Remove streams from LV part 1. 2021-08-11 11:35:10 +03:00
kssenii
7d8b694a9f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into cast-internal 2021-08-11 07:37:21 +00:00
kssenii
7f247becca Move some templates 2021-08-11 07:32:46 +00:00
Alexey Milovidov
08f8511854 Fix Style 2021-08-11 06:52:28 +03:00
alexey-milovidov
54d8282209
Merge pull request #27248 from azat/mt-mutation-stuck-fix
Fix mutation stuck on invalid partitions in non-replicated MergeTree
2021-08-11 06:10:15 +03:00
alexey-milovidov
a0a5c0da32
Update BackgroundJobsExecutor.cpp 2021-08-11 06:08:30 +03:00
Alexey Milovidov
c590a239d5 Merge branch 'master' into fix-bad-cast 2021-08-11 05:48:37 +03:00
Amos Bird
e63c26edb7
Fix projection materialization with missing columns 2021-08-10 21:47:27 +08:00
Nikolai Kochetov
8613cfd4e2
Merge branch 'master' into fix-access-gtest-in-arcadia 2021-08-10 16:13:11 +03:00
Maksim Kita
87fb75b272
Merge pull request #27191 from FArthur-cmd/memory-tracker-26043
Client with flag for memory tracker
2021-08-10 14:01:02 +03:00
kssenii
eb4746ac69 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into cast-internal 2021-08-10 09:38:41 +00:00
Nikolai Kochetov
a1ec7f75c5 Merge branch 'master' into qoega-fix-access-gtest-in-arcadia 2021-08-10 11:31:47 +03:00
Nikolai Kochetov
bb4c11cd27
Merge pull request #27298 from ClickHouse/fix-23515
Fix bug from #23515.
2021-08-09 23:25:30 +03:00
Nikolai Kochetov
8cc493a3cd Try fix build. 2021-08-09 18:09:29 +03:00
Pavel Kruglov
70b51133c1 Try to simplify code 2021-08-09 18:01:08 +03:00
Pavel Kruglov
0662df8b76 Fix performance with JIT, add arguments to function isSuitableForShortCircuitArgumentsExecution 2021-08-09 17:54:14 +03:00
Pavel Kruglov
e792fa588f Mark all Functions as sutable or not for executing as short circuit arguments 2021-08-09 17:50:09 +03:00
Maksim Kita
b8b24684b4
Merge pull request #27273 from ClickHouse/remove-streams-from-dicts
Remove streams from dicts
2021-08-09 15:58:37 +03:00
Nicolae Vartolomei
3f291b024a
Use plain mutex instead of MultiVersion 2021-08-09 13:58:23 +01:00
kssenii
d767f6704f Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-09 12:14:23 +00:00
Nikita Mikhaylov
73d3f2c60f
Merge pull request #26313 from fastio/control_execution_period_of_clearOldTemporaryDirectories
Control the execution period of clear old temporary directories by parameter
2021-08-09 14:29:24 +03:00
Nikolai Kochetov
4a00e402ae Fix spelling. 2021-08-09 12:09:09 +03:00
Nikolai Kochetov
372293b85d
Merge branch 'master' into fix-27179 2021-08-09 11:59:22 +03:00
Alexey Milovidov
8b9da6fe26 Merge branch 'master' into async-reads 2021-08-09 03:33:32 +03:00
mergify[bot]
316c254536
Merge branch 'master' into fix-bad-cast 2021-08-08 23:45:19 +00:00
kssenii
7991bb6e83 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into cast-internal 2021-08-08 21:30:17 +00:00
Azat Khuzhin
038241b6ed Add new index data skipping minmax index format for proper Nullable support
Note, that it cannot be done w/o new extension, since index does not
have any header.

v2: use IDisk interface for existence check
v3: remove extra file existence check
v4: fix MATERIALIZE INDEX
2021-08-08 19:30:12 +03:00
Azat Khuzhin
91d7f3daa7 Fix lock-order-inversion while notifying about finished mutations
TSAN reports [1]:

  WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=36)
    Cycle in lock order graph: M16388 (0x7b7400011d68) => M1030334152907497744 (0x000000000000) => M16388

    Mutex M1030334152907497744 acquired here while holding mutex M16388 in thread T4:
      0 pthread_mutex_lock <null> (clickhouse+0x967d536)
      1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) obj-x86_64-linux-gnu/../contrib/libcxx/include/__threading_support:405:10 (clickhouse+0x1b25c7d9)
      2 std::__1::mutex::lock() obj-x86_64-linux-gnu/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x1b25c7d9)
      3 std::__1::lock_guard<std::__1::mutex>::lock_guard(std::__1::mutex&) obj-x86_64-linux-gnu/../contrib/libcxx/include/__mutex_base:91:27 (clickhouse+0x15220cd9)
      4 DB::StorageMergeTree::getIncompleteMutationsStatus(long, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std:>
      5 DB::StorageMergeTree::waitForMutation(long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0::operator()() const obj-x86_64-linux-gnu/../src/Storages/StorageMergeTree.cpp:464:36 (clickhouse+0x1521e2b1)
      6 void std::__1::condition_variable::wait<DB::StorageMergeTree::waitForMutation(long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0>(std::__1::unique_lock<std::__1::mutex>&, DB::StorageMergeTree::waitForMutation(lon>
      7 DB::StorageMergeTree::waitForMutation(long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) obj-x86_64-linux-gnu/../src/Storages/StorageMergeTree.cpp:469:29 (clickhouse+0x1521e2b1)
      8 DB::StorageMergeTree::mutate(DB::MutationCommands const&, std::__1::shared_ptr<DB::Context const>) obj-x86_64-linux-gnu/../src/Storages/StorageMergeTree.cpp:496:9 (clickhouse+0x15221738)
      9 DB::InterpreterAlterQuery::execute() obj-x86_64-linux-gnu/../src/Interpreters/InterpreterAlterQuery.cpp:113:16 (clickhouse+0x141182f6)
      10 DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, bool, DB::ReadBuffer*) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:560:32 (clickhouse+0x149152f6)
      11 DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, bool) obj-x86_64-linux-gnu/../src/Interpreters/executeQuery.cpp:909:30 (clickhous>
      12 DB::TCPHandler::runImpl() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:313:24 (clickhouse+0x153270af)

      Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message

    Mutex M16388 acquired here while holding mutex M1030334152907497744 in thread T59:
      0 pthread_mutex_lock <null> (clickhouse+0x967d536)
      1 std::__1::__libcpp_mutex_lock(pthread_mutex_t*) obj-x86_64-linux-gnu/../contrib/libcxx/include/__threading_support:405:10 (clickhouse+0x1b25c7d9)
      2 std::__1::mutex::lock() obj-x86_64-linux-gnu/../contrib/libcxx/src/mutex.cpp:33:14 (clickhouse+0x1b25c7d9)
      3 std::__1::unique_lock<std::__1::mutex>::unique_lock(std::__1::mutex&) obj-x86_64-linux-gnu/../contrib/libcxx/include/__mutex_base:119:61 (clickhouse+0x15226c31)
      4 DB::StorageMergeTree::selectPartsToMutate(std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::shared_ptr<DB::RWLockImpl::LockHolderImpl>&) obj-x86_64-linux->
      5 DB::StorageMergeTree::scheduleDataProcessingJob(DB::IBackgroundJobExecutor&) obj-x86_64-linux-gnu/../src/Storages/StorageMergeTree.cpp:1060:28 (clickhouse+0x15228b10)
      6 DB::BackgroundJobsExecutor::scheduleJob() obj-x86_64-linux-gnu/../src/Storages/MergeTree/BackgroundJobsExecutor.cpp:229:17 (clickhouse+0x14f441dc)
      7 DB::IBackgroundJobExecutor::backgroundTaskFunction() obj-x86_64-linux-gnu/../src/Storages/MergeTree/BackgroundJobsExecutor.cpp:185:10 (clickhouse+0x14f438ed)

  [1]: https://clickhouse-test-reports.s3.yandex.net/27248/4f3b80ff33c846465983aa2bc9ae9490e1118b15/fuzzer_tsan/report.htmlfail1
2021-08-08 19:28:29 +03:00
Azat Khuzhin
7964355ecf Fix mutation stuck on invalid partitions in non-replicated MergeTree
v2: Do not try to process empty mutations
    Found with flaky check [1].

      [1]: https://clickhouse-test-reports.s3.yandex.net/27248/66e8c0833392c20ba8dba3780f2b0d5c18f8194e/functional_stateless_tests_flaky_check_(address).html#fail1
2021-08-08 19:28:15 +03:00
Azat Khuzhin
5139067631 Guard BackgroundJobsExecutor from thread termination in case of uncaught exception 2021-08-08 19:27:58 +03:00
Azat Khuzhin
702d9955c0 Fix distributed queries with zero shards and aggregation 2021-08-08 19:22:49 +03:00
mergify[bot]
ec331132c1
Merge branch 'master' into fix-bad-cast 2021-08-08 15:20:27 +00:00
Azat Khuzhin
3be3c503aa Fix some comments 2021-08-08 09:58:07 +03:00
alexey-milovidov
a7e26506cf
Merge pull request #26951 from ianton-ru/zero_copy_by_default
Set allow_remote_fs_zero_copy_replication to true by default
2021-08-08 04:46:49 +03:00
alexey-milovidov
ba3fbbaab0
Update ReplicatedMergeTreeMergeStrategyPicker.cpp 2021-08-08 04:43:59 +03:00
alexey-milovidov
e6e9a27d8f
Merge pull request #27377 from evillique/bz2
Add support for bzip2 compression method
2021-08-08 04:40:13 +03:00
Alexey Milovidov
1ad1e62b47 Fix unit test 2021-08-08 04:02:48 +03:00
Alexey Milovidov
24cef99065 Merge branch 'master' into fix-bad-cast 2021-08-08 04:00:29 +03:00
alexey-milovidov
c5207fc237
Merge pull request #26466 from azat/optimize-dist-select
Rework SELECT from Distributed optimizations
2021-08-08 03:59:32 +03:00
mergify[bot]
9869c8bb10
Merge branch 'master' into zero_copy_by_default 2021-08-07 16:53:44 +00:00
alexey-milovidov
24cc073a22
Merge pull request #27328 from ClickHouse/fix_partition_id_validation
Fix partition id validation
2021-08-07 18:45:19 +03:00
kssenii
9ca422f0c5 Introduce CAST for internal usage 2021-08-07 09:03:10 +00:00
Nikolay Degterinsky
9a45458faf Add bzip2 file compression 2021-08-07 00:25:52 +00:00
Alexander Tokmakov
5e2bfd5ba1 fix partition id validation 2021-08-06 23:56:51 +03:00
kssenii
073d7fdd5e Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into disk-over-web-server 2021-08-06 19:42:29 +00:00
Nikolai Kochetov
3cbeab8959 Fix incorrect row-level filtering 2021-08-06 21:16:06 +03:00
Nikolai Kochetov
157ecef3c2
Merge pull request #27227 from ClickHouse/do-not-update-settings-for-view
Revert #24095. User-level settings will affect queries from view.
2021-08-06 20:57:36 +03:00
mergify[bot]
c696817a79
Merge branch 'master' into control_execution_period_of_clearOldTemporaryDirectories 2021-08-06 16:16:22 +00:00
Nikolai Kochetov
7320411a7f Fix bug from #23515. 2021-08-06 16:39:11 +03:00
Anton Popov
3a0d4807a5 Merge branch 'async-insert' of git://github.com/abyss7/ClickHouse into merging-20557 2021-08-06 16:20:02 +03:00
vdimir
ffab19caad
Fix hasJoin in StorageView.cpp 2021-08-06 13:48:47 +03:00
vdimir
76ca40857a
Better error message for changed json_use_nulls in StorageView, check ast 2021-08-06 12:16:26 +03:00
tavplubix
14ef66e49b
Merge pull request #25895 from ClickHouse/improve_create_or_replace
Improve CREATE OR REPLACE query
2021-08-06 11:58:46 +03:00
Nikolai Kochetov
39ff5ab478 Merge branch 'master' into remove-streams-from-dicts 2021-08-06 11:46:27 +03:00
Nikolai Kochetov
13f95f3fdf Streams -> Processors for dicts, part 3. 2021-08-06 11:41:45 +03:00
Alexey Milovidov
cea9690327 Merge branch 'master' into async-reads 2021-08-05 23:58:57 +03:00
alexey-milovidov
1a3d8cebd2
Merge pull request #27197 from azat/nullable-index-fix
Fix on-disk format breakage for secondary indices over Nullable column
2021-08-05 21:52:18 +03:00
Artur
d2869d2e2b add test for memory tracker in client 2021-08-05 16:20:24 +00:00
vdimir
a427b19d3a
Check join_use_nulls changed in StorageView::read 2021-08-05 18:38:52 +03:00
Kseniia Sumarokova
5edd9e0513
Merge pull request #27198 from kssenii/postgres-db-schema
Support schema for postgres database engine
2021-08-05 18:30:47 +03:00
Kruglov Pavel
59a94bd322
Merge pull request #27183 from ClickHouse/fix_detached_parts_name_partsing
Fix part name parsing in system.detached_parts
2021-08-05 18:21:03 +03:00
Nikolai Kochetov
fc12310ee8 Revert #24095. User-level settings will affect queries from view. 2021-08-05 17:17:22 +03:00
Alexander Kuzmenkov
d852207b0e
Merge pull request #25721 from CurtizJ/read-in-order-perf-2
Reduce memory usage in queries with `ORDER BY primary_key
2021-08-05 16:13:48 +03:00
Maksim Kita
7fdf3cc263
Merge pull request #27180 from kitaisreal/storage-system-replicas-added-column-replica-is-active
Storage system replicas added column replica is active
2021-08-05 12:46:53 +03:00
terrylin
dd539f0a0d improvement of materilize ttl 2021-08-05 15:33:02 +08:00
terrylin
bd3d9a4518 materialize ttl recalculate only (optional) 2021-08-05 14:17:48 +08:00
Azat Khuzhin
dee27fcbb9 Fix on-disk format breakage for secondary indices over Nullable column
[1] breaks on disk format (and the relevant change in the:

  [1]: https://github.com/ClickHouse/ClickHouse/pull/12455#discussion_r682830812

Too bad that I checked this patchset only for compatibility after
reverting this patch [2] (use case: I've applied it manually, then
revert it, and data skipping indexes over Nullable column had been
broken)

  [2]: https://github.com/ClickHouse/ClickHouse/pull/12455#issuecomment-823423772

But this patchset actually breaks compatibility with older versions of
clickhouse for Nullable data skipping indexes after simple upgrade:

Here is a simple reproducer:

    --
    -- run this with 21.6 or similar (i.e. w/o this patch)
    --

    CREATE TABLE data
    (
        `key` Int,
        `value` Nullable(Int),
        INDEX value_index value TYPE minmax GRANULARITY 1
    )
    ENGINE = MergeTree
    ORDER BY key;

    INSERT INTO data SELECT
        number,
        number
    FROM numbers(10000);

    SELECT * FROM data WHERE value = 20000 SETTINGS force_data_skipping_indices = 'value_index' SETTINGS force_data_skipping_indices = 'value_index', max_rows_to_read=1;

Now upgrade and run the query again:

    SELECT * FROM data WHERE value = 20000 SETTINGS force_data_skipping_indices = 'value_index' SETTINGS force_data_skipping_indices = 'value_index', max_rows_to_read=1;

And it will fail because of on disk format changes:

    $ ll --time-style=+ data/*/data/all_1_1_0/skp*.idx
    -rw-r----- 1 azat azat 36  data/with_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx
    -rw-r----- 1 azat azat 37  data/without_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx

    $ md5sum data/*/data/all_1_1_0/skp*.idx
    a19c95c4a14506c65665a1e30ab404bf  data/with_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx
    e50e2fcfa873b232196623d56ab26105  data/without_nullable_patch/data/all_1_1_0/skp_idx_value_index.idx

Note, that there is no stable release with this patch included yet, so
no need to backport.

Also note that you may create data skipping indexes over Nullable
column even before [3].

  [3]: https://github.com/ClickHouse/ClickHouse/pull/12455

v2: break cases when granulas has Null in values due to backward
compatibility
2021-08-05 00:19:38 +03:00
kssenii
f06703a7c9 Support schema for postgres database engine 2021-08-04 20:52:45 +00:00
Azat Khuzhin
7a47327980 Fix used_storages by using log_queries from local context
I don't have log_queries enabled by default.
2021-08-04 21:44:19 +03:00
Anton Popov
9586bb7e90 fix pvs 2021-08-04 20:42:22 +03:00
terrylin
6f42ec6b9b fix compile error 2021-08-05 00:16:21 +08:00
Anton Popov
915ef50c2d optimize reading in order of key more 2021-08-04 18:18:03 +03:00
Alexander Tokmakov
23f8b3d07d fix part name parsing in system.detached_parts 2021-08-04 17:42:48 +03:00
terrylin
88b9e7f24f materialize ttl recalculate only optional 2021-08-04 22:16:13 +08:00
Anton Ivashkin
61016da2b1 Set allow_remote_fs_zero_copy_replication to true by default 2021-08-04 17:08:09 +03:00
Maksim Kita
3f48c85722 StorageSystemReplicas added column replica_is_active 2021-08-04 16:19:42 +03:00
Maksim Kita
4dc4854fad
Merge pull request #27168 from excitoon-favorites/safers3readbuffer
Safer `ReadBufferFromS3` for merges and backports
2021-08-04 15:01:21 +03:00
Yatsishin Ilya
55e06ea16b fix 2021-08-04 13:06:01 +03:00
Vladimir Chebotarev
c2410920d3 Safer ReadBufferFromS3 for merges and backports. 2021-08-04 09:14:20 +03:00
Alexey Milovidov
fd3b5680e2 Merge branch 'master' into async-reads 2021-08-03 23:13:31 +03:00
mergify[bot]
dc57254982
Merge branch 'master' into improve_create_or_replace 2021-08-03 11:39:07 +00:00
Maksim Kita
d9383270f6
Merge pull request #27054 from MaxWk/feature/add-default-database-to-system-users
add column default_database to system.users
2021-08-03 13:37:15 +03:00
Azat Khuzhin
97851bde08 Fix Distributed over Distributed for WithMergeableStateAfterAggregation* stages
In case if one Distributed has multiple shards, and underlying
Distributed has only one, there can be the case when the query will be
tried to process from Complete to WithMergeableStateAfterAggregation,
which is obviously wrong.
2021-08-03 10:10:08 +03:00
Kseniia Sumarokova
5d3abc14c7
Merge pull request #22045 from OmarBazaraa/mongo-ssl
Support SSL connection in MongoDB engine
2021-08-03 08:29:34 +03:00
tavplubix
58b50bad3a
Merge pull request #27033 from ClickHouse/database_replicated_fixes
Fix assertions in Replicated database
2021-08-02 23:33:18 +03:00
Azat Khuzhin
ff12f5102a Avoid running LIMIT BY/DISTINCT step on the initiator for optimize_distributed_group_by_sharding_key
Before the following queries was running LimitBy/Distinct step on the
initator:

  select distinct sharding_key from dist order by k

While this can be omitted.
2021-08-02 21:04:30 +03:00
Azat Khuzhin
2fb95d9ee0 Rework SELECT from Distributed query stages optimization
Before this patch it wasn't possible to optimize simple SELECT * FROM
dist ORDER BY (w/o GROUP BY and DISTINCT) to more optimal stage
(QueryProcessingStage::WithMergeableStateAfterAggregationAndLimit),
since that code was under
allow_nondeterministic_optimize_skip_unused_shards, rework it and make
it possible.

Also now distributed_push_down_limit is respected for
optimize_distributed_group_by_sharding_key.

Next step will be to enable distributed_push_down_limit by default.

v2: fix detection of aggregates
2021-08-02 21:04:29 +03:00
Azat Khuzhin
bb6d030fb8 Optimize distributed SELECT w/o GROUP BY 2021-08-02 21:04:29 +03:00
OmarBazaraa
71e1c82f87 Refactor 2021-08-02 15:16:39 +00:00
Alexander Tokmakov
42a8bb6872 fix assertions in Replicated database 2021-08-02 16:19:11 +03:00
OmarBazaraa
91928fdf5a Fix 2021-08-02 13:11:49 +00:00
OmarBazaraa
8577938efe Throw exception in case SSL is not enabled 2021-08-02 12:34:50 +00:00
Anton Popov
fc9d72e75d fix performance of short queries with large number of columns 2021-08-02 15:03:55 +03:00
Nikolai Kochetov
6951e8147d
Merge pull request #27020 from amosbird/shardlevelconstness
Shard-level const column
2021-08-02 13:45:20 +03:00
Anton Popov
cc3ed12ed6 Merge remote-tracking branch 'upstream/master' into HEAD 2021-08-02 02:56:00 +03:00
万康
66631ca680 add column default_database 2021-08-01 08:11:01 +08:00
Alexey Milovidov
2a0cba2b9f Merge branch 'master' into async-reads 2021-08-01 01:25:13 +03:00
alexey-milovidov
701e2ffd79
Merge pull request #27002 from azat/mutation-stuck
Fix possible mutation stuck due to race with DROP_RANGE
2021-07-31 21:17:46 +03:00
terrylin
09a4f82d0f code style check 2021-07-31 20:36:40 +08:00
Amos Bird
cd302eacc1
Fix projection match 2021-07-31 15:44:16 +08:00
tavplubix
00ac8194dc
Merge pull request #26896 from ClickHouse/small_improvement_in_queue
Maybe fix extremely rare `intersecting parts`.
2021-07-30 13:04:20 +03:00
terrylin
c49c2e5e18 fix compile error 2021-07-30 17:15:04 +08:00
mergify[bot]
41273ef5f3
Merge branch 'master' into mutation-stuck 2021-07-30 08:42:45 +00:00
Azat Khuzhin
bc9a4366d8 Fix possible mutation stack due to race with DROP_RANGE
After #25884 parts that was dropped (DROP_RANGE) will not be removed
from old mutations and this will stuck the mutation.

Interesting, that this mutation may continue after some merge.
2021-07-30 08:22:10 +03:00
terrylin
55f3e7e65a improvement of materilize ttl 2021-07-30 12:27:15 +08:00
alesapin
21599ffefc Simple validation for partition id before drop partition 2021-07-29 16:11:05 +03:00
alesapin
5799487caa Fix stupid bug 2021-07-29 14:54:36 +03:00
OmarBazaraa
a665cd3308 Fixes 2021-07-29 08:38:39 +00:00
Alexey Milovidov
1149058084 Merge branch 'master' into async-reads 2021-07-28 22:29:51 +03:00
alesapin
71169d7937
Merge pull request #26716 from nvartolomei/nv/part-cleanup-sequence
Avoid deleting old parts from FS on shutdown for replicated engine
2021-07-28 18:29:37 +03:00
OmarBazaraa
3a393042a2 Fix 2021-07-28 15:28:30 +00:00
OmarBazaraa
d8fb1cb0e0 Ref. 2021-07-28 14:08:57 +00:00
alesapin
bdc6858801 More correct comparsion 2021-07-28 13:19:34 +03:00
alesapin
26056cfb25 Fix extremely rare race condition on remove of unsuccessful entry from queue 2021-07-28 13:06:22 +03:00
OmarBazaraa
a154ccef7b Fix 2021-07-28 09:38:34 +00:00
Ivan
1417143560 Update StorageMongoDBSocketFactory.cpp 2021-07-28 09:38:34 +00:00
Ivan
0d029c1cbc Update StorageMongoDBSocketFactory.cpp 2021-07-28 09:38:34 +00:00
OmarBazaraa
58ea75915d Fix 2021-07-28 09:38:34 +00:00
Ubuntu
fce9351256 MongoDB SSL Connection 2021-07-28 09:38:34 +00:00
Alexander Tokmakov
fab4529c97 Merge branch 'master' into rename_materialize_mysql 2021-07-28 12:18:01 +03:00
alesapin
1277db4435
Merge pull request #26129 from ClickHouse/system_zookeeper_log
Add system.zookeeper_log table
2021-07-28 11:22:29 +03:00
kssenii
c6ee94db2e Fix 2021-07-28 08:11:10 +00:00
Alexey Milovidov
9baf84224a Fix build 2021-07-28 02:54:20 +03:00
Alexey Milovidov
fd5c1561e2 Merge branch 'master' into async-reads 2021-07-27 23:58:32 +03:00
Alexander Tokmakov
fc9ab2cda7 Merge branch 'master' into rename_materialize_mysql 2021-07-27 22:38:40 +03:00
Nicolae Vartolomei
8b07a7f180 Store exception generated when we tried to update the queue last time
The use case is to alert when queue contains broken entries. Especially
important when ClickHouse breaks backwards compatibility between
versions and log entries written by newer versions aren't parseable by
old versions.

```
Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected 'quorum: ' before: 'merge_type: 2\n'
```
2021-07-27 15:42:40 +01:00
Kseniia Sumarokova
b5dce17707
Merge pull request #26821 from azat/rocksdb-improvements
Add system.rocksdb and read rocksdb/rocksdb_TABLE options from config
2021-07-27 17:31:12 +03:00
tavplubix
168edaed73
Merge pull request #26808 from amosbird/safe2
Make sure table is readonly when restarting fails.
2021-07-27 17:21:08 +03:00
Nikolai Kochetov
97bc754dd8
Merge pull request #26758 from ClickHouse/output-streams-to-processors
Remove some output streams
2021-07-27 17:19:26 +03:00
alexey-milovidov
d7b2404119
Merge pull request #15408 from ClickHouse/random_timezone_for_stateless_tests
Use random timezone in stateless and stateful tests
2021-07-27 16:18:14 +03:00
Nikolai Kochetov
a9effdad18 Merge branch 'master' into output-streams-to-processors 2021-07-27 11:31:53 +03:00
Azat Khuzhin
8ef677b15f Add ability to set any rocksdb option via config.xml
v2: Cover rocksdb options in ClickHouse config
v3: add missing __init__.py
v4: Rework rocksdb options from config
v5: add column_family_options support
2021-07-27 08:40:50 +03:00
Alexey Milovidov
5e2ea4e042 Whitespace 2021-07-27 05:20:03 +03:00
Kseniia Sumarokova
ee13f2e6bc
Merge pull request #26795 from kssenii/fixing-sqlite
Fix sqlite engine attach
2021-07-27 00:37:31 +03:00
Azat Khuzhin
c7d2a5aad8 Add system.rocksdb table (with various rocksdb internals)
v2: fix USE_ROCKSDB check (there is #cmakedefine01 so it is either 0/1,
so we should not check with #ifdef)
2021-07-26 23:13:59 +03:00
Alexander Tokmakov
63ab38ee09 rename MaterializeMySQL to MaterializedMySQL 2021-07-26 21:17:28 +03:00
Nikolai Kochetov
61d8f880cd Rename some files. 2021-07-26 19:48:25 +03:00
Nikolai Kochetov
9b5a816b43 Merge branch 'master' into output-streams-to-processors 2021-07-26 18:03:11 +03:00
Nikolai Kochetov
0eb563dc1b Fix more tests. 2021-07-26 17:47:29 +03:00
Kseniia Sumarokova
5c5cb5d0d6
Update src/Storages/StorageSQLite.h
Co-authored-by: Vladimir <vdimir@yandex-team.ru>
2021-07-26 14:26:06 +03:00
Amos Bird
623faf47e4
Make sure table is readonly when restarting fails. 2021-07-26 19:21:14 +08:00
Nikolai Kochetov
fa1c223269 Fix some tests. 2021-07-26 13:08:40 +03:00
mergify[bot]
2929cf3ba8
Merge branch 'master' into system_zookeeper_log 2021-07-26 08:40:55 +00:00
mergify[bot]
044be267d6
Merge branch 'master' into improve_create_or_replace 2021-07-26 08:38:48 +00:00
kssenii
f3129b80f9 Fix sqlite attach 2021-07-26 07:20:41 +00:00
Alexey Milovidov
5c3f5cb35a Experiment with asynchronous readers 2021-07-26 03:34:36 +03:00
Alexey Milovidov
b6fdb395c2 Less verbose RocksDB logs #26252 2021-07-25 23:09:50 +03:00
alexey-milovidov
22fa1efacb
Merge pull request #26777 from ClickHouse/bolonini-read-from-file
Merging #25960 (Bolonini/read_from_file)
2021-07-25 01:33:34 +03:00
Alexey Milovidov
2f2dce399a Fix style 2021-07-25 01:26:21 +03:00
Alexey Milovidov
215505b985 Remove unused error code 2021-07-24 19:51:56 +03:00
Alexey Milovidov
774f6d2617 Allow to read file descriptor multiple times in File storage 2021-07-24 19:50:03 +03:00
Alexey Milovidov
456801ccb8 Merge branch 'pipe_reading' of github.com:BoloniniD/ClickHouse into bolonini-read-from-file 2021-07-24 19:24:22 +03:00
alexey-milovidov
d3127d6265
Merge pull request #26731 from vdimir/fix-async-drain-connection-uaf
Fix use after free in AsyncDrain connection from S3Cluster
2021-07-24 18:55:03 +03:00
BoloniniD
2fa02061b7 Fix parallel reads 2021-07-24 15:31:35 +03:00
alexey-milovidov
039bb1cc5e
Merge pull request #26720 from azat/part_log-fix-event_time_microseconds
Fix event_time_microseconds for REMOVE_PART in system.part_log
2021-07-24 15:09:37 +03:00
Alexey Milovidov
a4b6181920 Fix weirdness 2021-07-24 05:07:37 +03:00
Alexey Milovidov
edfeb0957f Fix strange code 2021-07-24 04:52:18 +03:00
alexey-milovidov
dab9cfb9c9
Merge pull request #26713 from ClickHouse/remove-more-and--more-streams
Remove more streams.
2021-07-24 02:24:10 +03:00
BoloniniD
07c57edbfc Merge branch 'master' of github.com:ClickHouse/ClickHouse into pipe_reading 2021-07-23 23:39:38 +03:00
Nikolai Kochetov
9c92f43359 Update storages. 2021-07-23 22:33:59 +03:00
Nikolai Kochetov
2dc5c89b66 Update Storage::write 2021-07-23 17:25:35 +03:00
vdimir
dccc379d39
Fix use after free in AsyncDrain connection from S3Cluster 2021-07-23 10:40:03 +03:00
Vitaly Baranov
19d5a6ab2f
Merge pull request #26714 from vitlibar/new-function-current-profiles
New functions currentProfiles(), enabledProfiles(), defaultProfiles().
2021-07-23 09:10:29 +03:00
Azat Khuzhin
00e2083421 Fix event_time_microseconds for REMOVE_PART in system.part_log 2021-07-23 00:59:08 +03:00
Vitaly Baranov
7afcc65060 Add new functions currentProfiles(), enabledProfiles(), defaultProfiles(). 2021-07-22 22:20:53 +03:00
Nikolai Kochetov
3c17a62686
Merge pull request #26590 from ClickHouse/remove-some-more-streams
Remove some streams.
2021-07-22 21:28:50 +03:00
Nicolae Vartolomei
f35e6eee19 Avoid deleting old parts from FS on shutdown for replicated engine
This was introduced in https://github.com/ClickHouse/ClickHouse/pull/8602.
The idea was to avoid data re-appearing in ClickHouse after DROP/DETACH
PARTITION. This problem was only present in MergeTree engine and I don't
understand why we need to do the same in ReplicatedMergeTree.

For ReplicatedMergeTree the state of truth is stored in ZK, deleting
things from filesystem just introduces inconsistencies and this is the
main source for errors like "No active replica has part X or covering
part".

The resulting problem is fixed by
https://github.com/ClickHouse/ClickHouse/pull/25820, but in my opinion
we would better avoid introducing the ZK/FS inconsistency in the first
place.

When does this inconsistency appear? Often the sequence is like this:

0. Write 2 parts to ZK [all_0_0_0, all_1_1_0]
1. A merge gets scheduled
2. New part replaces old parts [new: all_0_1_1, old: all_0_0_0, all_1_1_0]
3. Replica gets shutdown and old parts are removed from filesystem
4. Replica comes back online, metadata about all parts is still stored in ZK for this new replica.
5. Other replica after cleanup thread runs will have only [all_0_1_1] in
   ZK
5. User triggers a DROP_RANGE after a while (drop range is for all_0_1_9999*)
6. Each replica deletes from ZK only [all_0_1_1]. The replica that got
   restarted uses its in-memory state to choose nodes to delete from ZK.
7. Restart the replica again. It will now think that there are 2 parts
   that it lost and needs to fetch them [all_0_0_0, all_1_1_0].

`clearOldPartsAndRemoveFromZK` which is triggered from cleanup thread
runs cleanup sequence correctly, it first removes things from ZK and
then from filesystem. I don't see much benefit of triggering it on
shutdown and would rather have it called only from a single place.

---

This is a very, very edge case situation but it proves that the current
"fix" (https://github.com/ClickHouse/ClickHouse/pull/25820) isn't
complete.

```
create table test(
    v UInt64
)
engine=ReplicatedMergeTree('/clickhouse/test', 'one')
order by v
settings old_parts_lifetime = 30;

create table test2(
    v UInt64
)
engine=ReplicatedMergeTree('/clickhouse/test', 'two')
order by v
settings old_parts_lifetime = 30;

create table test3(
    v UInt64
)
engine=ReplicatedMergeTree('/clickhouse/test', 'three')
order by v
settings old_parts_lifetime = 30;

insert into table test values (1), (2), (3);
insert into table test values (4);

optimize table test final;

detach table test;
detach table test2;

alter table test3 drop partition tuple();

attach table test;
attach table test2;
```

```
(CONNECTED [localhost:9181]) /> ls /clickhouse/test/replicas/one/parts
all_0_0_0
all_1_1_0
(CONNECTED [localhost:9181]) /> ls /clickhouse/test/replicas/two/parts
all_0_0_0
all_1_1_0
(CONNECTED [localhost:9181]) /> ls /clickhouse/test/replicas/three/parts
```

```
detach table test;
attach table test;
```

`test` will now figure out that parts exist only in ZK and will issue `GET_PART`
after first removing parts from ZK.

`test2` will receive fetch for unknown parts and will trigger part checks itself.
Because `test` doesn't have the parts anymore in ZK `test2` will mark them as LostForever.
It will also not insert empty parts, because the partition is empty.

`test` is left with `GET_PART` in the queue and stuck.

```
SELECT
    table,
    type,
    replica_name,
    new_part_name,
    last_exception
FROM system.replication_queue

Query id: 74c5aa00-048d-4bc1-a2ea-6f69501c11a0

Row 1:
──────
table:          test
type:           GET_PART
replica_name:   one
new_part_name:  all_0_0_0
last_exception: Code: 234. DB::Exception: No active replica has part all_0_0_0 or covering part. (NO_REPLICA_HAS_PART) (version 21.9.1.1)

Row 2:
──────
table:          test
type:           GET_PART
replica_name:   one
new_part_name:  all_1_1_0
last_exception: Code: 234. DB::Exception: No active replica has part all_1_1_0 or covering part. (NO_REPLICA_HAS_PART) (version 21.9.1.1)
```
2021-07-22 17:48:16 +01:00
Nikolai Kochetov
f56a45155f Merge branch 'master' into remove-more-and--more-streams 2021-07-22 19:10:39 +03:00
Nikolai Kochetov
fd754430eb Remove more streams. 2021-07-22 19:05:52 +03:00
Maksim Kita
e08fc94137
Merge pull request #26678 from CurtizJ/minor-bugfix
Minor bugfix
2021-07-22 15:54:24 +03:00
Nikolai Kochetov
3ed3f7a9f7 Fix integration tests. 2021-07-22 13:38:22 +03:00
feihengye
6230ad0160
#26640 change kafka engine max consumers from 16 to physical cpu cores (#26642)
Co-authored-by: jhonye <jhonye@tencent.com>
2021-07-22 11:54:08 +03:00
Nikolai Kochetov
5ffd99dfd4
Merge pull request #25674 from amosbird/distributedreturnconnection
Drain connection asynchronously
2021-07-22 11:04:49 +03:00
Anton Popov
a36c387e4e fix iterating over list 2021-07-21 21:47:20 +03:00
Nikolai Kochetov
f38de35b14 Rename some constants. 2021-07-21 19:13:17 +03:00
Nikolai Kochetov
65d3e713d6 Fix another one test. 2021-07-21 15:16:13 +03:00
alexey-milovidov
fcca3e3e56
Merge pull request #26423 from ClickHouse/fix-header-for-scalar-query-with-empty-result
Fix incompatible result type for scalar queries with empty result.
2021-07-21 02:07:04 +03:00
Nikolai Kochetov
179ec05a72 Remove some streams. 2021-07-20 21:18:43 +03:00
Nikita Mikhaylov
348a3abb0b
Merge pull request #26508 from kitaisreal/storage-dictionary-quoted-names-fix
Storage Dictionary quoted names fix
2021-07-20 19:35:48 +03:00
BoloniniD
49ee24e824 What if we replace unique_lock with shared? 2021-07-20 19:22:41 +03:00
alexey-milovidov
3bcef76a9d
Merge pull request #26529 from kssenii/fixing-rabbitmq
Fix rabbitmq shutdown in case rabbitmq setup was not started
2021-07-20 16:41:25 +03:00