Commit Graph

23353 Commits

Author SHA1 Message Date
kssenii
bd68d1d6d0 Update test 2022-03-10 11:02:12 +01:00
kssenii
d089b0ac86 Fix race 2022-03-09 18:14:28 +01:00
kssenii
6571c7faa0 Clean up code 2022-03-09 10:36:52 +01:00
kssenii
96789fa5ce Fix test, disable cache for DiskCacheWrapper 2022-03-09 09:46:04 +01:00
kssenii
16e84c265b Fix build, update test 2022-03-08 21:41:58 +01:00
kssenii
5260822964 Merge master 2022-03-08 18:21:28 +01:00
kssenii
e231c3a3e0 Fix split build 2022-03-08 18:05:55 +01:00
Azat Khuzhin
a871036361
Fix parallel_reading_from_replicas with clickhouse-bechmark (#34751)
* Use INITIAL_QUERY for clickhouse-benchmark

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix parallel_reading_from_replicas with clickhouse-bechmark

Before it produces the following error:

    $ clickhouse-benchmark --stacktrace -i1 --query "select * from remote('127.1', default.data_mt) limit 10" --allow_experimental_parallel_reading_from_replicas=1 --max_parallel_replicas=3
    Loaded 1 queries.
    Logical error: 'Coordinator for parallel reading from replicas is not initialized'.
    Aborted (core dumped)

Since it uses the same code, i.e RemoteQueryExecutor ->
MultiplexedConnections, which enables coordinator if it was requested
from settings, but it should be done only for non-initial queries, i.e.
when server send connection to another server.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix 02226_parallel_reading_from_replicas_benchmark for older shellcheck

By shellcheck 0.8 does not complains, while on CI shellcheck 0.7.0 and
it does complains [1]:

    In 02226_parallel_reading_from_replicas_benchmark.sh line 17:
        --allow_experimental_parallel_reading_from_replicas=1
        ^-- SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.

    Did you mean:
        "--allow_experimental_parallel_reading_from_replicas=1"

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/34751/d883af711822faf294c876b017cbf745b1cda1b3/style_check__actions_/shellcheck_output.txt

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 16:42:29 +01:00
Azat Khuzhin
c4b6342853
Improvements for parallel_distributed_insert_select (and related) (#34728)
* Add a warning if parallel_distributed_insert_select was ignored

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Respect max_distributed_depth for parallel_distributed_insert_select

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Print warning for non applied parallel_distributed_insert_select only for initial query

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Remove Cluster::getHashOfAddresses()

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Forbid parallel_distributed_insert_select for remote()/cluster() with different addresses

Before it uses empty cluster name (getClusterName()) which is not
correct, compare all addresses instead.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix max_distributed_depth check

max_distributed_depth=1 must mean not more then one distributed query,
not two, since max_distributed_depth=0 means no limit, and
distribute_depth is 0 for the first query.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Fix INSERT INTO remote()/cluster() with parallel_distributed_insert_select

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Add a test for parallel_distributed_insert_select with cluster()/remote()

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Return <remote> instead of empty cluster name in Distributed engine

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

* Make user with sharding_key and w/o in remote()/cluster() identical

Before with sharding_key the user was "default", while w/o it it was
empty.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 15:24:39 +01:00
kssenii
f3cba6f270 Remove already fixed crutch 2022-03-08 14:30:21 +01:00
Antonio Andelic
bc5d7aea57
Merge pull request #34876 from azat/long-INSERT-fix
Fix possible "Part directory doesn't exist" during INSERT
2022-03-08 12:44:53 +01:00
kssenii
28a3aece60 Fix uncaught exception from destructor 2022-03-08 10:58:37 +01:00
Kseniia Sumarokova
517e878c6e
Merge pull request #35099 from ClickHouse/tavplubix-patch-1
Fix inconsistency in DiskLocal
2022-03-08 10:18:07 +01:00
Kseniia Sumarokova
1eb2bae792
Merge pull request #34954 from bigo-sg/hive_read_columns_pruning
read columns pruning for hive
2022-03-08 10:17:24 +01:00
Azat Khuzhin
caffc144b5 Fix possible "Part directory doesn't exist" during INSERT
In #33291 final part commit had been defered, and now it can take
significantly more time, that may lead to "Part directory doesn't exist"
error during INSERT:

    2022.02.21 18:18:06.979881 [ 11329 ] {insert} <Debug> executeQuery: (from 127.1:24572, user: default) INSERT INTO db.table (...) VALUES
    2022.02.21 20:58:03.933593 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18044_18044_0 to 20220214_270654_270654_0.
    2022.02.21 21:16:50.961917 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18197_18197_0 to 20220214_270689_270689_0.
    ...
    2022.02.22 21:16:57.632221 [ 64878 ] {} <Warning> db.table: Removing temporary directory /clickhouse/data/db/table/tmp_insert_20220214_18232_18232_0/
    ...
    2022.02.23 12:23:56.277480 [ 11329 ] {insert} <Trace> db.table: Renaming temporary part tmp_insert_20220214_18232_18232_0 to 20220214_273459_273459_0.
    2022.02.23 12:23:56.299218 [ 11329 ] {insert} <Error> executeQuery: Code: 107. DB::Exception: Part directory /clickhouse/data/db/table/tmp_insert_20220214_18232_18232_0/ doesn't exist. Most likely it is a logical error. (FILE_DOESNT_EXIST) (version 22.2.1.1) (from 127.1:24572) (in query: INSERT INTO db.table (...) VALUES), Stack trace (when copying this message, always include the lines below):

Follow-up for: #28760
Refs: #33291

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-08 07:44:11 +03:00
lgbo-ustc
a8cfc2458a update codes 2022-03-08 11:55:15 +08:00
alexey-milovidov
df1a031851
Merge pull request #35046 from vdimir/issue-35044
Fix trim function
2022-03-08 01:50:02 +03:00
Maksim Kita
2f9361008b
Merge pull request #35089 from 1lann/1lann/fix-update_lag-typo
Fix typo of update_lag
2022-03-07 23:12:35 +01:00
kssenii
4f53080921 Fix 2022-03-07 22:03:12 +01:00
kssenii
0737aef472 Fix split build 2022-03-07 22:02:07 +01:00
Nikolai Kochetov
8f77b2b778
Merge pull request #34889 from ClickHouse/finally-enable-s3-async-writes-again
Update DiskS3.cpp
2022-03-07 21:31:44 +01:00
alesapin
71ecd6be74
Merge pull request #35004 from ClickHouse/more_keeper_sanity_checks
More keeper sanity checks
2022-03-07 19:53:59 +01:00
Kseniia Sumarokova
5511f2f6e6
Merge pull request #34940 from bigo-sg/hive_client_connection_pool
Use connection pool in HiveMetastoreClient
2022-03-07 17:14:56 +01:00
Kseniia Sumarokova
28b9ec01c0
Merge pull request #34945 from bigo-sg/hive_bug_fixed
unexpected result when use `in` in hive query
2022-03-07 17:13:11 +01:00
kssenii
eeb0ae9816 Fix detaching query 2022-03-07 17:05:36 +01:00
tavplubix
84e22fb32b
Update DiskLocal.cpp 2022-03-07 18:59:00 +03:00
Antonio Andelic
81e56a06a3
Merge pull request #35066 from ClickHouse/remove-useless-define
Remove useless define
2022-03-07 15:28:28 +01:00
kssenii
059d239815 Simplify code 2022-03-07 15:17:38 +01:00
kssenii
692b247379 Fix some corner cases 2022-03-07 14:31:21 +01:00
mergify[bot]
88052e2d7c
Merge branch 'master' into finally-enable-s3-async-writes-again 2022-03-07 12:55:52 +00:00
tavplubix
34505be1de
Merge pull request #35081 from azat/fix-shutdown-deadlock
Avoid possible deadlock on server shutdown
2022-03-07 13:47:15 +01:00
alesapin
0c93c9e21d
Merge pull request #35010 from bigo-sg/keeperstatopt
Keeper atomic stat
2022-03-07 12:34:28 +01:00
alesapin
d90bee1df9
Merge pull request #35080 from azat/mutate-exceptions
Do not hide exceptions during mutations
2022-03-07 12:22:49 +01:00
alesapin
e81bbfb5b5 Review fixes 2022-03-07 12:13:37 +01:00
vdimir
688493373f
Try to fix trim function 2022-03-07 11:08:11 +00:00
Vladimir C
678f05ca1e
Merge pull request #34912 from kssenii/fix-filelog-metadata-path 2022-03-07 11:45:29 +01:00
alesapin
4d86bf6fdf Merge branch 'master' into more_keeper_sanity_checks 2022-03-07 11:41:04 +01:00
Kseniia Sumarokova
cdb9a05229
Merge pull request #34605 from bigo-sg/add_metric_for_local
Add cpu/mem metric for clickhouse-local
2022-03-07 11:40:11 +01:00
1lann
5423c5a45c Fix typo of update_lag
In external dictionary providers, the allowed keys for configuration seemed to have a typo
of "update_lag" as "update_tag", preventing the use of "update_lag". This change fixes that.
2022-03-07 18:31:20 +08:00
lgbo-ustc
8ae5296ee8 fixed compile errors 2022-03-07 17:26:48 +08:00
mergify[bot]
f57dcbf8d1
Merge branch 'master' into remove-useless-define 2022-03-07 07:52:37 +00:00
lgbo-ustc
cfeedd2cb5 fixed code style 2022-03-07 12:28:31 +08:00
zhanglistar
9efc8a1d38 Fix min/max stat 2022-03-07 11:11:14 +08:00
lgbo-ustc
c37eedd887 update codes 2022-03-07 10:30:54 +08:00
lgbo-ustc
75a50a30c4 update codes 2022-03-07 09:43:53 +08:00
lgbo-ustc
d907b70cc4 update codes: get actual read block 2022-03-07 09:26:05 +08:00
lgbo-ustc
f4d8fb46c5 update codes 2022-03-07 09:26:05 +08:00
lgbo-ustc
62c1bd5ae9 hive read columns pruning 2022-03-07 09:26:05 +08:00
kssenii
2dcfe66236 Fix race 2022-03-06 20:33:07 +01:00
mergify[bot]
086b8e147a
Merge branch 'master' into more_compatible_read 2022-03-06 12:05:47 +00:00