Commit Graph

740 Commits

Author SHA1 Message Date
taiyang-li
b4440131d0 add metrics for clickhouse-local 2022-02-15 16:25:07 +08:00
Maksim Kita
91bc9cd4cf
Merge pull request #34499 from vitlibar/grpc-send-output-format-back-to-client
gRPC: Send output format back to client
2022-02-13 15:34:32 +01:00
Vitaly Baranov
cf2e205b08 Add field output_columns to first Result sent in gRPC protocol. 2022-02-10 21:05:56 +07:00
Vitaly Baranov
bd746fd82b Add fields query_id and time_zone to first Result sent in gRPC protocol. 2022-02-10 21:05:47 +07:00
Vitaly Baranov
f8c8eeceea Add field output_format to first Result sent in gRPC protocol. 2022-02-10 21:05:08 +07:00
Dmitry Novik
d405523598 Fix ProfileEvents sending in INSERT SELECT 2022-02-10 13:27:27 +00:00
Kruglov Pavel
738355b724
Merge pull request #34408 from vitlibar/split-and-rename-compression-fields-in-grpc
Split and rename compression fields in gRPC
2022-02-10 15:40:20 +03:00
Anton Popov
298838f891 avoid unnecessary copying of Settings 2022-02-10 12:13:51 +03:00
Vitaly Baranov
1341b4b4de Rename QueryInfo's field result_compression -> transport_compression_type and change its type for better consistency.
Make the previous field obsolete.
2022-02-10 02:46:05 +07:00
Vitaly Baranov
1f6b65d39d gRPC: Split compression_type field into input_compression_type and output_compression_type.
Make the previous field obsolete.
2022-02-10 02:46:05 +07:00
Vitaly Baranov
b2ba0c4320 Fix inserting to temporary tables via gRPC. 2022-02-07 12:36:17 +07:00
Vitaly Baranov
5dd49a44e6 Add test for propagating OpenTelemetry context via gRPC protocol. 2022-02-06 02:09:56 +07:00
alexey-milovidov
665fdc9187
Merge pull request #31257 from FArthur-cmd/merge_15765
Merge #15765
2022-02-04 00:39:57 +03:00
alexey-milovidov
4742cf3074
Update CertificateReloader.cpp 2022-02-03 03:03:46 +03:00
Azat Khuzhin
5472aef084 Fix current_user/current_address for interserver mode
Before this patch current_user/current_address will be preserved from
the previous query.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-02 17:44:19 +03:00
Sergei Trifonov
68bc456830
Merge pull request #34223 from azat/bump-fmt
Bump fmtlib from 7.0.0 to 8.1.1
2022-02-02 00:03:25 +03:00
Vitaly Baranov
2ef2479ddc
Add const to make clang-tidy happy 2022-02-01 18:38:52 +07:00
Azat Khuzhin
de80014eb5 Use fmt::format over Poco::format in PostgreSQLHandler
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:04 +03:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

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

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
FArthur-cmd
3dc64f031a correct code style 2022-01-31 12:21:22 +00:00
FArthur-cmd
891411a2be add try catch to avoid errors on start 2022-01-31 12:13:28 +00:00
Andre Marianiello
f5cbc6da43 Propagate trace context from GRPC calls 2022-01-28 14:27:04 -05:00
FArthur-cmd
cb4ad97d45 add test 2022-01-28 17:37:52 +00:00
Filatenkov Artur
82b0fc0bd0
Merge branch 'master' into merge_15765 2022-01-24 13:38:53 +03:00
alesapin
5ec76cd827 Merge branch 'master' into better_hashmap 2022-01-21 12:47:41 +03:00
Azat Khuzhin
6acb4d6ac5 Remove unbundled gRPC support 2022-01-20 08:47:16 +03:00
Nikita Mikhaylov
e3de3889e3
Revert "Revert "Ignore parse failure of opentelemetry header (#32116)" (#33594)" (#33595) 2022-01-19 20:53:39 +03:00
alesapin
3d325aacf6 Merge branch 'master' into better_hashmap 2022-01-19 12:31:23 +03:00
tavplubix
34b3894422
Merge pull request #33676 from ClickHouse/fix-8340
Correctly determine current database if CREATE TEMPORARY TABLE AS SELECT is queried inside a named HTTP session.
2022-01-17 16:52:09 +03:00
alesapin
4fb8761a22 Merge branch 'master' into better_hashmap 2022-01-17 15:51:50 +03:00
alesapin
b2271cc2d9
Merge pull request #33288 from JackyWoo/add_lower_bound_session_timeout_to_keeper
Add lower bound session timeout to keeper
2022-01-17 14:06:15 +03:00
Alexey Milovidov
4ab7dfc741 Fix #8340 2022-01-16 08:12:55 +03:00
alesapin
ec6840f49c Make ZooKeeper client better interpret keeper server connection reject 2022-01-13 17:12:10 +03:00
Nikita Mikhaylov
340ec0fd20
Revert "Ignore parse failure of opentelemetry header (#32116)" (#33594)
This reverts commit 4e5f9c8ff7.
2022-01-13 16:29:18 +04:00
mergify[bot]
085492614b
Merge branch 'master' into add_lower_bound_session_timeout_to_keeper 2022-01-13 12:21:46 +00:00
Frank Chen
4e5f9c8ff7
Ignore parse failure of opentelemetry header (#32116) 2022-01-13 16:16:10 +04:00
Azat Khuzhin
e8c7e5e8f0 Fix typo in sendMergeTreeReadTaskRequestAssumeLocked() 2022-01-07 20:04:57 +03:00
alesapin
f8114126ed Use HashMap and arena with free lists for keeper 2021-12-30 19:21:49 +03:00
JackyWoo
569ce62e8d use session_timeout as session timeout uper bound 2021-12-30 17:18:51 +08:00
JackyWoo
19b5394be8 fix tests 2021-12-30 15:49:48 +08:00
JackyWoo
d35e5f8319 add lower bound session timeout to keeper 2021-12-29 20:59:01 +08:00
Vitaly Baranov
f80a3e3247
Merge pull request #30549 from aiven/kmichel-server-reload
Start/stop servers when `listen_host`/`*_port` changes
2021-12-27 14:51:00 +03:00
Alexey Milovidov
29d28c531f Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
Kevin Michel
ffc1fca296
Start/stop servers when listen_host/*_port changes
This allows starting and stopping separately each protocol server
without restarting ClickHouse.

This also allows adding or removing `listen_host` entries, which
start and stops servers for all enabled ports.

When stopping a server, the listening socket is immediately closed
(and available for another server).

Protocols with persistent connections try to wait for any currently
running query to finish before closing the connection, but idle
connection are closed quickly (depending on how often the protocol
is polled).

An extra ProfileEvent is added, `MainConfigLoads`, it is
incremented every time the configuration is reloaded. This helps
when trying to assess whether the new configuration was applied.
2021-12-24 08:26:02 +01:00
alexey-milovidov
8c9843caf2
Merge pull request #32982 from azat/http-context-leak
Fix Context leak in case of cancel_http_readonly_queries_on_client_close
2021-12-23 07:58:18 +03:00
mergify[bot]
04f727e84c
Merge branch 'master' into read-fix 2021-12-22 13:49:04 +00:00
alesapin
754785fee5 Better container 2021-12-21 11:07:24 +03:00
Azat Khuzhin
08ced87880 Rework MultipartReadBuffer::skipToNextBoundary()
As suggested by @vitlibar
2021-12-21 08:38:41 +03:00
Azat Khuzhin
d7c7a91f66 Check that at least one boundary exist in HTMLForm::readMultipart() 2021-12-21 08:38:41 +03:00
Azat Khuzhin
4dfa9324d1 Check for EOF in MultipartReadBuffer::skipToNextBoundary()
Otherwise you may hit internal assertion when client goes away:

    clickhouse-server: ./src/Server/HTTP/HTMLForm.cpp:245: bool DB::HTMLForm::MultipartReadBuffer::skipToNextBoundary(): Assertion `boundary_hit' failed.

Fixes: 02151_http_s_structure_set_eof
2021-12-21 08:38:41 +03:00