Commit Graph

10893 Commits

Author SHA1 Message Date
Azat Khuzhin
70049db143 CurrentMetrics/Increment: Introduce add() 2021-03-03 23:30:03 +03:00
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
Pavel Kruglov
dc9dd8ccdc Fix typo 2021-03-03 16:16:17 +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
bd7b540b82
Merge pull request #21307 from amosbird/moduleopt
Specialize intDiv/module
2021-03-03 04:49:29 +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
6e5638cee8
Merge pull request #21366 from songenjie/shutdown_timeout_log
[ClickHouse][LOG]correct shutdown timeout log
2021-03-03 01:55:15 +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
Nikolai Kochetov
8e6fa404c4
Merge pull request #21246 from ucasFL/union-distinct-improve
Improve Normalization of ASTSelectWithUnionQuery
2021-03-02 21:37:07 +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
Amos Bird
134216dc4a Specialize intDiv/module 2021-03-02 16:27:28 +03:00
Pavel Kruglov
4166ae1f45 Restart timeout when we make progress 2021-03-02 15:40:24 +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
turbo jason
3a6307a990 [ClickHouse][LOG]correct shutdown timeout log 2021-03-02 15:13:54 +08:00
Amos Bird
c41dedc922
optimize for ColumnLowCardinality 2021-03-02 11:55:58 +08:00
alexey-milovidov
32c011052f
Update IColumnImpl.h 2021-03-02 11:55:58 +08:00
alexey-milovidov
220d3cae7f
Update IColumn.h 2021-03-02 11:55:58 +08:00
Amos Bird
62e8684ad1
IColunm::hasEqualValues() 2021-03-02 11:55:58 +08:00
feng lv
a26c9e64a9 fix
fix
2021-03-02 03:20:03 +00:00
Nikolai Kochetov
f82e00ff3c Fix inconsistent column type for Values input format. 2021-03-01 23:10:50 +03:00
Maksim Kita
ca98bb68d4
Merge pull request #21353 from kitaisreal/aggregate-function-sum-map-better-comment
AggregateFunctionSumMap better comment message
2021-03-01 19:19:07 +03:00
Maksim Kita
7ed5900251
Updated style 2021-03-01 19:18:56 +03:00
Maksim Kita
019a2090c7
Fix unused variable 2021-03-01 19:18:14 +03:00
Maksim Kita
3764a2a2be AggregateFunctionSumMap better comment message 2021-03-01 19:15:59 +03:00
tavplubix
10aa26576c
Update DatabaseReplicatedWorker.cpp 2021-03-01 17:11:45 +03:00
Anton Popov
c98e6bb1ad
Merge pull request #20550 from ClickHouse/fix-number-of-threads-in-subqueries
Fix number of threads in subqueries
2021-03-01 15:49:38 +03:00
Kruglov Pavel
caaa0c5e86
Restart tests. 2021-03-01 13:25:20 +03:00
alesapin
9c8afbeb53 Fix alter modify query for partition key and other metadata fields 2021-03-01 12:59:19 +03:00