Commit Graph

2571 Commits

Author SHA1 Message Date
Roman Vasin
3de3ae1b64 Set ConcurrencyControl::Unlimited when total_max_threads 0 or undefined 2022-06-21 16:39:53 +03:00
Roman Vasin
b7cde2c5ad Remove total_max_threads logic from QueryPipelineBuilder; Add setMaxConcurrency(total_max_threads) in Server.cpp 2022-05-31 19:43:15 +03:00
Roman Vasin
441bd3e81f Merge remote-tracking branch 'origin/concurrency-control' into ADQM-445 2022-05-31 15:07:02 +03:00
Azat Khuzhin
dc9ca3d70c
Fix LOGICAL_ERROR in getMaxSourcePartsSizeForMerge during merges (#37413) 2022-05-26 14:14:58 +02:00
Alexey Milovidov
f321925032
Merge pull request #36341 from ClickHouse/allow-setuid-inside-clickhouse
Allow to drop privileges at startup
2022-05-26 01:07:04 +03:00
Alexey Milovidov
0b5cfa4094 Fix split build 2022-05-25 04:24:02 +02:00
Alexey Milovidov
4556904dae Fix stress test 2022-05-25 04:21:25 +02:00
guykohen
938e766d7e Remove height restrictions from the query div in play web tool, and make sure width of the query box won't shrink below 100%.
Default height is set to 20% which should be big enough for medium queries.
2022-05-24 20:32:13 -04:00
guykohen
0036b1a6ee Remove height restrictions from the query div in play web tool, and make sure width of the query box won't shrink below 100%. 2022-05-24 18:24:54 -04:00
Alexey Milovidov
d773bd610d
Revert "Remove height restrictions from the query div in play web tool, and m…" 2022-05-25 00:58:57 +03:00
Alexey Milovidov
516fba27dc Merge branch 'master' into allow-setuid-inside-clickhouse 2022-05-24 23:31:14 +02:00
guyco87
ee33f95160
Merge branch 'master' into adjustable-query-block 2022-05-24 12:23:54 -04:00
guykohen
e8b329595e Remove height restrictions from the query div in play web tool, and make sure width of the query box won't shrink below 100%. 2022-05-24 12:18:58 -04:00
Vitaly Baranov
497c70d786
Merge pull request #37269 from vitlibar/rework-access-control-notifications
Rework AccessControl's notifications.
2022-05-24 17:47:45 +02:00
Roman Vasin
2491213166 Set default value to 0 for total_max_threads parameter. Code style cleanup. 2022-05-24 18:40:45 +03:00
Alexey Milovidov
fd7642b6aa Fix "splitted" build 2022-05-24 06:04:48 +02:00
Alexey Milovidov
29e6a7ed8c Keep controls in place when the page is scrolled horizontally 2022-05-24 04:11:32 +02:00
Alexey Milovidov
5b1bdfc353 Fix error 2022-05-24 02:02:18 +02:00
Alexey Milovidov
e8c08cda0d Fix error in static-files-disk-uploader 2022-05-24 01:38:17 +02:00
Alexey Milovidov
ee0a8f3251 Fix exception messages 2022-05-24 01:37:17 +02:00
Alexey Milovidov
89c8d136c3 Fix error 2022-05-23 07:20:36 +02:00
Alexey Milovidov
03b118557c Fix error 2022-05-23 03:52:44 +02:00
Alexey Milovidov
39d157b9fb Fix error 2022-05-23 03:52:00 +02:00
Alexey Milovidov
b432ca93a1 Fix error 2022-05-23 03:11:12 +02:00
Alexey Milovidov
cc985d9b92 Fix error 2022-05-23 02:30:33 +02:00
Alexey Milovidov
2f93f11144 Maybe better 2022-05-23 02:03:13 +02:00
Alexey Milovidov
7ad8d48771 Merge branch 'master' into allow-setuid-inside-clickhouse 2022-05-23 01:09:08 +02:00
Vitaly Baranov
58f4a86ec7 Rework notifications used in access management. 2022-05-21 10:15:39 +02:00
Roman Vasin
83958d2549 Add more intergration tests. Add documenation text. Change thread_factor to 3. Add logging. Set default value = -1 to see the results CI tests. 2022-05-20 15:52:50 +03:00
Robert Schulze
b475fbc9a7
Merge pull request #37300 from ClickHouse/cmake-cleanup-pt3
Various cmake cleanups
2022-05-20 10:02:36 +02:00
Sergei Trifonov
2450ab9079
Merge pull request #36686 from azat/disk-least-used
Implement least_used load balancing algorithm for disks inside volume
2022-05-20 09:16:07 +02:00
Alexey Milovidov
03e3be7b1a Maybe fix error 2022-05-20 02:38:50 +02:00
Alexey Milovidov
d0d0807a10 Merge branch 'master' into allow-setuid-inside-clickhouse 2022-05-20 02:37:15 +02:00
Robert Schulze
c0d5705891
Merge pull request #37326 from ClickHouse/fix-marks-cache-size-cfg
Provide default value for mark_cache_size
2022-05-19 20:20:25 +02:00
Azat Khuzhin
ba26b3cf4c Implement lead_used load balancing algorithm for disks inside volume
v2: rebase on top removed raid1
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 14:10:11 +03:00
Azat Khuzhin
456444eadb Add storage_configuration example into config.xml
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 14:10:11 +03:00
Azat Khuzhin
29a8a00656 Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
v2: fix LocalConnection::sendQuery() for Suggest (comes w/o client_info) [1]
    [1]: https://s3.amazonaws.com/clickhouse-test-reports/37290/7c85175963226ff78eec542efafcff4e650aa0f0/stateless_tests__ubsan__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 07:19:27 +03:00
Robert Schulze
a2214760c6
Remove mark_cache_size from further files
- changed config.xml/yaml files used by CH's own internal tests which
  are (hopefully) not sensitive to mark_cache_size being set or not

- further occurrences exist but changing them seems a bad idea (e.g.
  because they are in customer-provided data)
2022-05-18 22:09:14 +02:00
Robert Schulze
8ca58cd5a5
Provide default value for mark_cache_size
I played around with my local config.xml file. The minimal working example is this:
<?xml version="1.0"?>
<clickhouse>
    <mark_cache_size>5368709120</mark_cache_size>
    <listen_host>localhost</listen_host>
    <tcp_port>9000</tcp_port>
    <users_config>users.xml</users_config>
    <logger><console>true</console></logger>
</clickhouse>

Not specifying mark_cache_size made the server not start up:
  2022.05.18 12:15:06.549078 [ 8728320 ] {} <Error> Application: Not found: mark_cache_size

Looking at ClickHouse's ca. 100 server configuration options +
sub-options, it seems that mark_cache_size is NOT special enough to
require explicit configuration but instead that the behavior was
unintended because no default value was provided.
2022-05-18 15:28:19 +02:00
Roman Vasin
e966016c1a Corrected all issues found by Style Check (actions). Renamed setGlobalMaxThreads into setTotalMaxThreads. 2022-05-17 19:35:40 +03:00
Vitaly Baranov
f34a5cdee2
Merge branch 'master' into ON_CLUSTER-grant 2022-05-17 13:21:20 +02:00
Vitaly Baranov
23a61b1596
Merge pull request #36700 from azat/fix-server-reload
Fix server reload on port change (do not wait for current connections from query context)
2022-05-17 12:25:21 +02:00
Roman Vasin
7cc63f3eed Removed logging code 2022-05-17 10:02:54 +03:00
Robert Schulze
43945cea1b
Fixing some warnings 2022-05-16 20:59:27 +02:00
Roman Vasin
159ea14739 Code cleanup. Corrected Loggers path. Refactoring Context code. 2022-05-16 19:48:17 +03:00
Alexey Milovidov
434b8fbf14
Revert "Remove height restrictions from the query div in play web tool." 2022-05-16 19:20:30 +03:00
Azat Khuzhin
c8420c0dbe Remove duplication for server connections check
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-16 16:22:58 +03:00
Azat Khuzhin
e503f1f22c Keep reloaded servers and currently active in one list
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-16 16:22:58 +03:00
Azat Khuzhin
f15a5461be Fix server reload on port change (do not wait for current connections)
If you will execute 'SYSTEM RELOAD CONFIG' via, i.e., TCP protocol, then
reload on port change will endlessly wait for connection from which this
query had been issued, and you will see the following message in the
logs:

    2022.04.28 03:34:57.552513 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Debug> executeQuery: (from 127.0.0.1:11774) system reload config
    ...
    2022.04.28 03:34:57.710640 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Information> Application: Stopped listening for http://127.0.0.1:18123
    2022.04.28 03:34:57.798774 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Information> Application: Stopped listening for native protocol (tcp): 127.0.0.1:19000
    ...
    2022.04.28 03:34:57.901375 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Debug> Application: Server finished: http://127.0.0.1:18123
    2022.04.28 03:34:57.901455 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Trace> Application: Waiting server to finish: native protocol (tcp): 127.0.0.1:19000
    2022.04.28 03:34:58.001717 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Trace> Application: Waiting server to finish: native protocol (tcp): 127.0.0.1:19000
    2022.04.28 03:34:58.101881 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Trace> Application: Waiting server to finish: native protocol (tcp): 127.0.0.1:19000
    ...
    2022.04.28 03:35:01.707951 [ 37101 ] {b41d855c-4dbf-470a-a144-c6ae5a1abda8} <Trace> Application: Waiting server to finish: native protocol (tcp): 127.0.0.1:19000

But waiting for the current connection will never ends.

So instead of waiting directly from the query context (SYSTEM RELOAD
CONFIG) do this in background (actually not even in background, but
check on server reload and on exit).

v0: just don't wait for the servers
v2: fix use-after-free by removing dependency from server in handlers
v3: wait servers in background to avoid use-after-free of the context
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-16 16:22:58 +03:00
Azat Khuzhin
01e1c5345a Add separate CLUSTER grant
In case you have different roles for the same user on multiple clusters,
ON CLUSTER query can help to overcome some limitations.

Consider the following example:
- cluster_with_data, dev_user (readonly=2)
- stage_cluster, dev_user (readonly=0)

So when you will execute the following query from stage_cluster, it will
be successfully executed, since ON CLUSTER queries has different system
profile:

    DROP DATABASE default ON CLUSTER cluster_with_data

This is not 100% safe, but at least something.

Note, that right now only ON CLUSTER query it self is supported, but
separate clusters are not (i.e. GRANT CLUSTER some_cluster_name TO
default), since right now grants sticked to database+.

v2: on_cluster_queries_require_cluster_grant
v3: fix test and process flags as bit mask
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-16 13:57:45 +03:00