Commit Graph

58482 Commits

Author SHA1 Message Date
Azat Khuzhin
017c054a35 Distributed/DirectoryMonitor: Use std::lock_guard over std::unique_lock
It is more natural, since we do not need lazy locking.
2021-03-03 23:30:03 +03:00
Azat Khuzhin
fcf49a4914 Distributed: Calculate counters for async INSERT at INSERT time
Previous patch fixes the inaccuracy, but it's done using iterating over
directory on each request (to system.distribution_queue or to check
bytes_to_throw_insert), and like previous patch alredy stated, it may
have pretty huge overhead (especially when you have lots of distributed
files pending).

This patch remove that recalculation (but it will still be done, and
if there is different, there will be a log message), and replace it with
proper account at INSERT time (and after file has been sent, or marked
as broken).
2021-03-03 23:30:03 +03:00
Azat Khuzhin
b43046ba06 Distributed: More accurate distribution_queue counters
So now system.distribution_queue will show accurate statistics, so tests
does not requires sleep anymore.

But note that with too much distributed pending this will iterate over
all directories.
2021-03-03 23:30:03 +03:00
Azat Khuzhin
b5a5778589 Distributed: Add ability to limit amount of pending bytes for async INSERT
Right now with distributed_directory_monitor_batch_inserts=1 and
insert_distributed_sync=0 INSERT into Distributed table will store
blocks that should be sent to remote (and in case of
prefer_localhost_replica=0 to the localhost too) on the local
filesystem, and sent it in background.

However there is no limit for this storage, and if the remote is
unavailable (or some other error), these pending blocks may take
significant space, and this is not always desired behaviour.

Add new Distributed setting - bytes_to_throw_insert, that will set the
limit for how much pending bytes is allowed, if the limit will be
reached an exception will be throw.

By default was set to 0, to avoid surprises.
2021-03-03 23:30:00 +03:00
Azat Khuzhin
ce09b7ff89 Distributed: Implement totalBytes() (system.tables.total_bytes) 2021-03-03 23:29:11 +03:00
Azat Khuzhin
456cbaf747 Distributed: Hide private part of the interface 2021-03-03 23:29:11 +03:00
Azat Khuzhin
8531431bbc getClusterName: Use std::string over String (since it includes only <string>) 2021-03-03 23:29:11 +03:00
Alexey Milovidov
e8df9971f1 Fix Arcadia 2021-03-03 18:12:39 +03:00
robot-clickhouse
6a6bc3924d Update version_date.tsv after release 20.8.14.4 2021-03-03 16:53:26 +03:00
Nikolai Kochetov
991f0e4bca
Merge pull request #21418 from Avogar/hedged-fix
Fix typo in setting name
2021-03-03 16:27:52 +03:00
Pavel Kruglov
dc9dd8ccdc Fix typo 2021-03-03 16:16:17 +03:00
Alexander Kuzmenkov
f169be740a
Merge pull request #21381 from ClickHouse/aku/perf-negative
fix a rare false negative in perf tests
2021-03-03 15:55:14 +03:00
Nikolai Kochetov
019513d869 Try fix perftests. 2021-03-03 13:42:44 +03:00
Nikolai Kochetov
cb122160ae
Merge pull request #19291 from Avogar/hedged-requests
Implementation of HedgedRequests
2021-03-03 12:58:37 +03:00
alesapin
6b1005aea5
Merge pull request #21334 from ClickHouse/fix_alter_partition_key
Fix alter modify query for partition key and other metadata fields
2021-03-03 10:15:11 +03:00
alexey-milovidov
36c5fd840b
Merge pull request #21392 from ClickHouse/add-test-14740
Add a test for #14740
2021-03-03 06:33:18 +03:00
alexey-milovidov
bd7b540b82
Merge pull request #21307 from amosbird/moduleopt
Specialize intDiv/module
2021-03-03 04:49:29 +03:00
alexey-milovidov
9092bc3b85
Merge pull request #21387 from den-crane/tests/issue21369
test for issue#21369
2021-03-03 03:05:01 +03:00
Anton Popov
a4c00ab5dc
Merge pull request #21303 from ucasFL/forbid
Forbid to drop a column if it's referenced by materialized view
2021-03-03 02:55:06 +03:00
alexey-milovidov
33bb77f777
Merge pull request #21367 from amosbird/mysqlfix
mysql client compatibility
2021-03-03 02:13:58 +03:00
alexey-milovidov
a1424bc675
Merge pull request #21365 from azat/clickhouse-stop-kill-wait
clickhouse stop: wait for the server to be killed (process exited)
2021-03-03 02:11:17 +03:00
Alexey Milovidov
a93e29ef4a Add a test for #14740 2021-03-03 02:00:19 +03:00
alexey-milovidov
6e5638cee8
Merge pull request #21366 from songenjie/shutdown_timeout_log
[ClickHouse][LOG]correct shutdown timeout log
2021-03-03 01:55:15 +03:00
Pavel Kruglov
d1524b749e Fix tests 2021-03-03 01:24:41 +03:00
alexey-milovidov
c78256ad65
Merge pull request #21327 from amosbird/hasequalvalue
IColunm::hasEqualValues()
2021-03-03 01:19:26 +03:00
Pavel Kruglov
82a6be44cf Disable changing replica when we have made progress 2021-03-03 01:03:03 +03:00
Kruglov Pavel
fbe0a14a2f
Merge pull request #21035 from anmolarora/system-parts-requested-columns-fill
Fill only requested columns when querying system.parts & system.parts…
2021-03-03 00:39:45 +03:00
Denis Zhuravlev
1278b5c71a test for issue#21369 2021-03-02 16:29:11 -04:00
Nikolai Kochetov
8e6fa404c4
Merge pull request #21246 from ucasFL/union-distinct-improve
Improve Normalization of ASTSelectWithUnionQuery
2021-03-02 21:37:07 +03:00
Alexander Kuzmenkov
08148e062f Fix a rare false negative in perf tests 2021-03-02 19:21:30 +03:00
alesapin
c29d7c7f49 Shutup clang tidy 2021-03-02 19:13:36 +03:00
Amos Bird
9411d496d9
Fix build 2021-03-02 23:17:02 +08:00
Pavel Kruglov
4269eaa252 Change tests 2021-03-02 17:05:33 +03:00
Amos Bird
134216dc4a Specialize intDiv/module 2021-03-02 16:27:28 +03:00
robot-clickhouse
d9e22ba646 Update version_date.tsv after release 20.12.8.5 2021-03-02 15:53:39 +03:00
Pavel Kruglov
4166ae1f45 Restart timeout when we make progress 2021-03-02 15:40:24 +03:00
robot-clickhouse
24860bd291 Update version_date.tsv after release 21.1.6.13 2021-03-02 15:17:44 +03:00
robot-clickhouse
658a62b7fc Update version_date.tsv after release 21.2.5.5 2021-03-02 14:54:01 +03:00
Amos Bird
494c2dba6c
Fix error 2021-03-02 19:12:51 +08:00
alesapin
4e33587043 Comments 2021-03-02 13:57:09 +03:00
Amos Bird
ad4fd75fb4
mycli compatibility 2021-03-02 18:53:06 +08:00
Nikolai Kochetov
ffbea93b10
Merge pull request #19576 from traceon/row-policy-with-prewhere
Allow row policies with PREWHERE
2021-03-02 13:51:37 +03:00
alesapin
06678d650d Merge branch 'master' into fix_alter_partition_key 2021-03-02 13:43:41 +03:00
alesapin
9ebf1b4fad Get rid of separate minmax index fields 2021-03-02 13:33:54 +03:00
tavplubix
ee22eeea6c
Merge pull request #21357 from ClickHouse/fix-21140
Fix inconsistent column type for Values input format.
2021-03-02 13:12:12 +03:00
Nikolai Kochetov
59a2c45555
Update executeQuery.cpp 2021-03-02 13:09:29 +03:00
Amos Bird
3df57da2d8
mysql client compatibility 2021-03-02 17:06:40 +08:00
Pavel Kruglov
153bfbfc28 Merge branch 'master' of github.com:ClickHouse/ClickHouse into hedged-requests 2021-03-02 11:59:32 +03:00
tavplubix
d305b23338
Merge pull request #21079 from azat/distributed_ddl_pool_size-zk-fix
Fix various issues in DDLWorker (SIGSEGV and others)
2021-03-02 11:59:30 +03:00
Pavel Kruglov
780a65e3a0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into system-parts-requested-columns-fill 2021-03-02 10:29:26 +03:00