Commit Graph

3371 Commits

Author SHA1 Message Date
Antonio Andelic
d6cbc5d05b Fix tests 2023-03-23 15:01:51 +00:00
Nikolay Degterinsky
fac45f1955
Merge pull request #47887 from evillique/new-install-options
Add options `--link` and `-y` to clickhouse install
2023-03-23 15:34:39 +01:00
Vitaly Baranov
f49cab91c0
Merge pull request #47002 from ilejn/orphaned_role
Tests for orphaned role fix
2023-03-23 14:09:34 +01:00
Antonio Andelic
a4d1cd514d Refactor 2023-03-23 08:58:56 +00:00
Yatsishin Ilya
5786aba5eb Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-03-22 14:08:22 +00:00
Nikolay Degterinsky
8851b2b8f6 Add options --link and -y to clickhouse install 2023-03-22 12:53:22 +00:00
Antonio Andelic
65b99ec6a7 Merge branch 'master' into alternative-keeper-configs 2023-03-22 12:22:57 +00:00
avogar
a8ea305a5a Fix build 2023-03-21 17:25:37 +00:00
Ilya Golshtein
5091b4e224 orphaned role - expiration_time => expiration_time_seconds 2023-03-21 08:44:08 +01:00
Ilya Golshtein
e1d1ead941 orphaned role - tests only 2023-03-20 23:21:25 +01:00
Robert Schulze
3b7f929001
Merge branch 'master' into rs/qc-cachebase 2023-03-20 17:08:47 +01:00
Vitaly Baranov
198409e12a
Merge pull request #46085 from aalexfvk/alexfvk/store_udf_in_zookeeper
Replication of user-defined SQL functions using ZooKeeper
2023-03-20 13:41:29 +01:00
Alexey Milovidov
e805d75756 ClickHouse Obfuscator: add README 2023-03-20 07:10:47 +01:00
Robert Schulze
c4664c70a1
Merge branch 'master' into rs/qc-cachebase 2023-03-19 15:23:24 +01:00
Robert Schulze
23281c7348
Merge pull request #47669 from ClickHouse/rs/more-gold-removal
Follow-up to #47660: Further removal of gold linker support
2023-03-17 14:58:23 +01:00
Robert Schulze
f8980c582e
CMake: More removal of gold linker (follow-up to #47660)
+ fix a linker warning
2023-03-17 11:01:46 +00:00
Aleksei Filatov
f84aa2f4ca Add classes for replication UDF to ZooKeeper 2023-03-17 13:56:04 +03:00
Kruglov Pavel
a3510a2ffe
Merge pull request #47271 from Avogar/codecs-better
Add optional parameters to some codecs, fix aborts in clickhouse-compressor with some codecs.
2023-03-16 12:20:23 +01:00
Robert Schulze
7d7052350c
Merge branch 'master' into rs/qc-cachebase 2023-03-16 10:42:17 +01:00
robot-ch-test-poll3
9d14c14a54
Merge pull request #47573 from azat/odbc-fix
Change error code in case of columns definitions was empty in ODBC
2023-03-15 12:31:54 +01:00
Robert Schulze
75ca2dd0e2
Merge remote-tracking branch 'origin/master' into rs/qc-cachebase 2023-03-15 10:55:53 +00:00
Yatsishin Ilya
45c5275bfb Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-03-14 17:27:25 +00:00
Azat Khuzhin
a72647690d Change error code in case of columns definitions was empty in ODBC
CI reports [1]:

    2023.03.14 00:29:07.031349 [ 166170 ] {110f8654-7d7d-4b47-b6b0-3ce83414a80f} <Error> ReadWriteBufferFromHTTP: HTTP request to `http://127.0.0.1:9018/columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1` failed at try 1/1 with bytes read: 0/unknown. Error: DB::HTTPException: Received error from remote server /columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1. HTTP status code: 500 Internal Server Error, body: Error getting columns from ODBC 'Code: 49. DB::Exception: Columns definition was not returned. (LOGICAL_ERROR) (version 23.2.4.12 (official build))'

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/47541/3d247b8635da44bccfdeb5fcd53be7130b8d0a32/upgrade_check__msan_.html

Here the problem is that system.columns has cached value for number of
total table to iterate, and so it can skip something.

But anyway, this should be LOGICAL_ERROR, since ODBC bridge does two
queries:
- to system.tables and
- to system.columns

And if between this two queries the table will be removed, them there
will be no columns

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:24:11 +01:00
Robert Schulze
657aa65446
Cleanup: Untangle CacheBase's constructors
This prepares for the custom TTLCachePolicy which users should not be
able to configure explicitly.
2023-03-13 15:11:12 +00:00
Alexander Tokmakov
7b1b238d0b Revert "Merge pull request #25674 from amosbird/distributedreturnconnection"
This reverts commit 5ffd99dfd4, reversing
changes made to 2796aa333f.
2023-03-11 19:09:47 +01:00
Alexander Tokmakov
bd124a24ea Revert "Merge pull request #31965 from azat/connection-drain-pull"
This reverts commit 6cb54b4092, reversing
changes made to 42d938ffa0.
2023-03-11 17:24:38 +01:00
Clayton McClure
b0931c8967
Update copier to use group by to find partitions (#47386) 2023-03-09 15:49:00 +01:00
Yatsishin Ilya
6cde37093a Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-03-08 13:34:18 +00:00
Mike Kot
9920a52c51 use std::lerp, constexpr hex.h 2023-03-07 22:50:17 +00:00
Kruglov Pavel
5e1eec48fe
Merge branch 'master' into codecs-better 2023-03-07 12:51:46 +01:00
avogar
b5f19ee12c Make better 2023-03-06 19:34:36 +00:00
avogar
8847561fc2 Add optional parameters to some codecs, fix aborts in clickhouse-compressor with some codecs 2023-03-06 16:49:28 +00:00
Antonio Andelic
c38d820d0f Add 4LW for cleaning resource 2023-03-05 16:57:18 +00:00
Nikita Mikhaylov
5c4da5aa4a
Use separate thread pool for IO operations for backups (#47174) 2023-03-03 20:05:42 +01:00
Robert Schulze
851b256a9c
Merge pull request #47136 from phil-88/patch-1
External dictionaries / library-bridge: Fix error "unknown library method 'extDict_libClone'"
2023-03-03 11:07:37 +01:00
Nikolay Degterinsky
d6798e412a
Merge pull request #47113 from alexkorep/feature/editor-tabs-on-enter
Automatic indentation in the built-in UI SQL editor
2023-03-02 22:39:31 +01:00
Alexey Milovidov
9c01c6cc25 Add Cloud 2023-03-02 22:30:52 +01:00
Yatsishin Ilya
d4304d2028 Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-03-02 16:16:18 +00:00
alex filatov
bafd9773bc
fix Unknown library method 'extDict_libClone'
We have an issue when using external dictionary. Occasionally library bridge called with extDict_libClone and fails with Unknown library method 'extDict_libClone'. And it looks like it is because of at some point `else if (method == "extDict_libNew")` was changed to  if (lib_new) with no handling for extDict_libClone inside this new if else statement and reporing an error that extDict_libClone is an unknown method.

So there is a two-line fix to handle extDict_libClone properly.

Error logs that we have:

```
2022.12.16 14:17:44.285088 [ 393573 ] {} <Error> ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:18:00: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=be2b2cd1-ba57-4658-8d1b-35ef40ab005b&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone'
2022.12.16 14:17:44.387049 [ 399133 ] {} <Error> ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:17:51: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=0df866ac-6c94-4974-a76c-3940522091b9&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone'
2022.12.16 14:17:44.488468 [ 397769 ] {} <Error> ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:19:38: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=2d8af321-b669-4526-982b-42c0fabf0e8d&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone'
2022.12.16 14:17:44.489935 [ 398226 ] {datamarts_v_dwh_node0032-241534:0x552da2_1_11} <Error> executeQuery: Code: 510. DB::Exception: Update failed for dictionary 'dict.vhash_s': Code: 510. DB::Exception: Update failed for dictionary dict.vhash_s : Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=be2b2cd1-ba57-4658-8d1b-35ef40ab005b&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone'
```
2023-03-02 15:53:09 +03:00
Alexey Korepanov
169398ec07 Add check for empty leading spaces 2023-03-01 21:57:51 +01:00
Alexey Korepanov
67b271b1fa Keep indentation on Enter in the web UI 2023-03-01 12:20:49 +01:00
pufit
29296cb004
Merge pull request #46550 from ClickHouse/46231-systerm-server-settings
Implement `system.server_settings`
2023-02-28 11:23:15 -05:00
bkuschel
77607ba0d4 Fix setenv string call 2023-02-27 08:01:15 -05:00
Alexey Milovidov
83c41755ed Remove unused header 2023-02-25 03:21:14 +01:00
Alexey Milovidov
4134e56ef0 Increase the limit for opened files in clickhouse-local 2023-02-25 03:20:47 +01:00
pufit
1157bf2d9f Removed unnecessary ifs 2023-02-22 15:15:09 -05:00
Nikolay Degterinsky
af992ca2db
Better 2023-02-22 16:51:36 +01:00
Nikolay Degterinsky
cdbff57e6c
Ask for password interactively 2023-02-22 15:58:06 +01:00
Antonio Andelic
7f5fb77ed5
Increase table retries in cluster copier tests (#46590) 2023-02-22 15:09:48 +01:00
Yatsishin Ilya
80857638c1 Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-02-22 13:58:17 +00:00
Kruglov Pavel
3ba3fdbfa3
Merge pull request #46607 from kssenii/delay-loading-of-named-collections
Do not load named collections on server startup (on first access instead)
2023-02-22 13:22:34 +01:00
Kevin Zhang
d9cff3a5e8 fix layout issues in dashboard.html 2023-02-21 13:52:28 -05:00
Kseniia Sumarokova
24d0490ef3
Merge branch 'master' into delay-loading-of-named-collections 2023-02-21 00:24:18 +01:00
kssenii
9d16205c8a Load named collections on first access 2023-02-20 16:33:45 +01:00
pufit
ff4e23aca8
Update programs/server/Server.cpp
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-02-19 16:48:55 -05:00
Alexey Milovidov
f073cd470f
Merge pull request #46478 from ClickHouse/fix_test_store_cleanup
Fix some flaky integration tests
2023-02-18 17:33:02 +03:00
pufit
4496db66b2 Implement system.server_settings 2023-02-17 23:46:09 -05:00
Alexander Tokmakov
3457b68dcc fix 2023-02-17 17:57:49 +01:00
Alexey Milovidov
ecf893ea0d
Merge pull request #46518 from mdelapenya/tc-go-0.18.0
chore: bump testcontainers-go to 0.18.0
2023-02-17 18:23:23 +03:00
Alexander Tokmakov
fb3574d2cf Merge branch 'master' into fix_test_store_cleanup 2023-02-17 13:59:22 +01:00
Kseniia Sumarokova
094a03b4c8
Merge pull request #46480 from azat/client-connections
Allow to override host for client connection credentials
2023-02-17 13:40:39 +01:00
Manuel de la Peña
79781aa024 chore: bump testcontainers-go to 0.18.0 2023-02-17 11:03:26 +01:00
Alexander Tokmakov
9feb448a5e fix a race condition 2023-02-16 14:41:18 +01:00
Azat Khuzhin
2dbcfdbe15 Allow to override host for client connection credentials
Introduce new `--connection` option, by default as a connection name
`--host` will be used.

And using --connection you also can specify --host and it will be
overwritten.

Follow-up for: #45715
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-16 14:26:24 +01:00
alesapin
d08b2753e4
Merge pull request #46367 from ClickHouse/reduce-keeper-build-time
Do not build libclickhouse-keeper-lib.a for standalone keeper
2023-02-16 13:56:27 +01:00
robot-clickhouse-ci-1
2fbed70029
Merge pull request #46433 from ClickHouse/fix-cluster-copier
Another fix for cluster copier
2023-02-16 09:40:51 +01:00
Sergei Trifonov
3ad41b29ec
Merge pull request #46247 from ClickHouse/round-robin-merge-scheduler 2023-02-16 08:03:22 +01:00
Kevin Zhang
c8d7b72e5d move database credential inputs to the center on initial load 2023-02-15 15:09:36 -05:00
Antonio Andelic
8cdafcc2d0 Correctly check if there were failures 2023-02-15 11:45:57 +00:00
Mikhail f. Shiryaev
08ffb8f93d
Install only "programs" directory during build 2023-02-15 11:49:19 +01:00
Nikolay Degterinsky
3075656e1d Merge remote-tracking branch 'upstream/master' into HEAD 2023-02-15 10:06:44 +00:00
Sergei Trifonov
b7a4fa8bd9
Merge branch 'master' into round-robin-merge-scheduler 2023-02-14 20:39:02 +01:00
Antonio Andelic
8d16fe5793
Merge branch 'master' into add-support-for-settings-alias 2023-02-13 08:46:00 +01:00
serxa
c58b165b0f add config option to select scheduling policy 2023-02-11 16:18:42 +00:00
Antonio Andelic
f96d480563
Merge branch 'master' into add-support-for-settings-alias 2023-02-09 16:07:45 +01:00
Robert Schulze
e490ec91d9
Merge branch 'master' into rs/fix-fragile-linking 2023-02-09 11:33:59 +01:00
Alexey Milovidov
d9fbf643bc
Merge pull request #45226 from hanfei1991/hanfei/gwp-asan
Introduce llvm/gwp-asan
2023-02-09 09:24:52 +03:00
Yatsishin Ilya
c5103ae469 Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-02-08 14:09:34 +00:00
Yatsishin Ilya
200e50b8e1 more changes in apps help 2023-02-08 12:55:56 +00:00
Alexander Gololobov
a7c30eecf4
Merge pull request #46141 from ClickHouse/fix-assertion-in-statistics
Fix assertion in statistical functions
2023-02-08 13:42:02 +01:00
Robert Schulze
6ff232d782
Merge branch 'master' into rs/fix-fragile-linking 2023-02-08 12:51:12 +01:00
Alexey Milovidov
55c3bbb739 Fix assertion in statistical functions 2023-02-08 00:09:41 +01:00
Azat Khuzhin
ff324fe81a Fix fault injection in copier (wrong query syntax)
There are very frequent flakiness of `test_cluster_copier` test, here is
an example of copier failures on CI [1]:

    AssertionError: Instance: s0_1_0 (172.16.29.9). Info: {'ID': '5d68dcb46fdb4b0c54b7c7ba1ddde83b8f34d483bbb32abcb0c52b966444ce82', 'Running': False, 'ExitCode': 85, 'ProcessConfig': {'tty': False, 'entrypoint': '/usr/bin/clickhouse', 'arguments': ['copier', '--config', '/etc/clickhouse-server/config-copier.xml', '--task-path', '/clickhouse-copier/task_simple_4DFWYTDD49', '--task-file', '/task0_description.xml', '--task-upload-force', 'true', '--base-dir', '/var/log/clickhouse-server/copier', '--copy-fault-probability', '0.2', '--experimental-use-sample-offset', '1'], 'privileged': False, 'user': '0'}, 'OpenStdin': False, 'OpenStderr': True, 'OpenStdout': True, 'CanRemove': False, 'ContainerID': 'f356df6694b3cc09ee9830c623681626f8e8d999677c188b9fe911aa702784ca', 'DetachKeys': '', 'Pid': 84332}
    assert 85 == 0

But let's look what the error it is, apparently it is UNFINISHED:

    SELECT
        name,
        code
    FROM system.errors
    WHERE ((code % 256) = 85) AND (NOT remote)
    SETTINGS system_events_show_zero_values = 1

    ┌─name─────────────────────────────┬─code─┐
    │ FORMAT_IS_NOT_SUITABLE_FOR_INPUT │   85 │
    │ UNFINISHED                       │  341 │
    │ NO_SUCH_ERROR_CODE               │  597 │
    └──────────────────────────────────┴──────┘

Let's verify:

    $ grep -r UNFINISHED ./test_cluster_copier/_instances_0/s0_1_0/logs/copier/clickhouse-copier_*
    ./test_cluster_copier/_instances_0/s0_1_0/logs/copier/clickhouse-copier_20230206220846_368/log.log:2023.02.06 22:09:19.015251 [ 368 ] {} <Error> : virtual int DB::ClusterCopierApp::main(const std::vector<std::string> &): Code: 341. DB::Exception: Too many tries to process table cluster1.default.hits. Abort remaining execution. (UNFINISHED), Stack trace (when copying this message, always include the lines below):

And apparently that it is due to query error with fault injection:

    2023.02.06 22:09:15.654724 [ 368 ] {} <Error> Application: An error occurred while processing partition 0: Code: 62. DB::Exception: Syntax error (Query): failed at position 168 ('Native'): Native. Expected one of: token, Dot, OR, AND, BETWEEN, NOT BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, MOD, DIV, IS NULL, IS NOT NULL, alias, AS, Comma, OFFSET, WITH TIES, BY, LIMIT, SETTINGS, UNION, EXCEPT, INTERSECT, INTO OUTFILE, FORMAT, end of query. (SYNTAX_ERROR), Stack trace (when copying this message, always include the lines below):

Example:

    select x from x limit  1FORMAT Native

    Syntax error: failed at position 32 ('Native'):

So fixing this should fix test_cluster_copier flakiness.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/46045/bd4170e03c6af583a51d12d2c39fa775dcb9997b/integration_tests__release__[4/4].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 17:01:06 +01:00
Azat Khuzhin
18d2a99761 Use comments for variables that clang can parse
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 16:53:45 +01:00
Yatsishin Ilya
1baa15d603 Merge remote-tracking branch 'origin/master' into clickhouse-help 2023-02-07 15:46:59 +00:00
Han Fei
0f7defb87f
Merge branch 'master' into hanfei/gwp-asan 2023-02-07 14:55:55 +01:00
Robert Schulze
08c1f8346e
Merge remote-tracking branch 'origin/master' into rs/fix-fragile-linking 2023-02-07 11:22:00 +00:00
Robert Schulze
84b9ff450f
Fix terribly broken, fragile and potentially cyclic linking
Sorry for the clickbaity title. This is about static method
ConnectionTimeouts::getHTTPTimeouts(). It was be declared in header
IO/ConnectionTimeouts.h, and defined in header
IO/ConnectionTimeoutsContext.h (!). This is weird and caused issues with
linking on s390x (##45520). There was an attempt to fix some
inconsistencies (#45848) but neither did @Algunenano nor me at first
really understand why the definition is in the header.

Turns out that ConnectionTimeoutsContext.h is only #include'd from
source files which are part of the normal server build BUT NOT part of
the keeper standalone build (which must be enabled via CMake
-DBUILD_STANDALONE_KEEPER=1). This dependency was not documented and as
a result, some misguided workarounds were introduced earlier, e.g.
0341c6c54b

The deeper cause was that getHTTPTimeouts() is passed a "Context". This
class is part of the "dbms" libary which is deliberately not linked by
the standalone build of clickhouse-keeper. The context is only used to
read the settings and the "Settings" class is part of the
clickhouse_common library which is linked by clickhouse-keeper already.

To resolve this mess, this PR

- creates source file IO/ConnectionTimeouts.cpp and moves all
  ConnectionTimeouts definitions into it, including getHTTPTimeouts().

- breaks the wrong dependency by passing "Settings" instead of "Context"
  into getHTTPTimeouts().

- resolves the previous hacks
2023-02-05 20:49:34 +00:00
Robert Schulze
9b841d67e8
Merge remote-tracking branch 'origin/master' into qc-max_cache_size 2023-02-05 16:47:02 +00:00
Antonio Andelic
12569da984 Merge branch 'master' into add-support-for-settings-alias 2023-02-05 16:08:57 +00:00
Boris Kuschel
1d4cf4fe69
Add encryption support with openssl 2023-02-04 14:59:34 -05:00
Alexey Milovidov
22bd0b6f69
Merge pull request #38983 from CurtizJ/randomize-mt-settings
Allow to randomize merge tree settings in tests
2023-02-04 02:59:52 +01:00
Mikhail f. Shiryaev
cd2e1cfada
Merge pull request #45568 from ClickHouse/keeper-systemd
Add systemd.service for clickhouse-keeper
2023-02-03 23:08:02 +01:00
Yatsishin Ilya
f4cfd8a2d9 Merge remote-tracking branch 'origin' into clickhouse-help 2023-02-03 20:08:23 +00:00
Antonio Andelic
8929838fcc Merge branch 'master' into add-support-for-settings-alias 2023-02-03 17:47:00 +00:00
Nikita Mikhaylov
33877b5e00
Parallel replicas. Part [2] (#43772) 2023-02-03 14:34:18 +01:00
Anton Popov
cdbe145bc1
Merge pull request #45796 from CurtizJ/fix-leak-in-azure-sdk
Fix test `test_azure_blob_storage_zero_copy_replication ` (memory leak in azure sdk)
2023-02-03 14:16:19 +01:00
Mikhail f. Shiryaev
a42d20e19d
Create "coordination" directory in keeper if does not exist 2023-02-03 12:16:19 +01:00
Robert Schulze
f72286c8f3
Merge branch 'master' into qc-max_cache_size 2023-02-03 10:54:35 +01:00
Robert Schulze
b1889b0284
Make the naming a little less confusing 2023-02-02 19:18:39 +00:00