ClickHouse® is a real-time analytics DBMS
Go to file
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
.github Fix shellcheck in tags_stable.yml 2022-05-11 13:29:14 +02:00
base Merge remote-tracking branch 'origin/master' into clangtidies 2022-05-16 10:12:50 +02:00
benchmark Add benchmark script for testing clouds 2022-05-09 04:05:32 +02:00
cmake Cosmetics 2022-05-15 16:07:10 +02:00
contrib Replace variable ARCH_ARM by ARCH_AARCH64 2022-05-15 09:48:02 +02:00
docker Merge branch 'master' into array-distance-functions 2022-05-11 16:55:02 +02:00
docs Merge pull request #37223 from ni1l/master 2022-05-16 13:42:06 +02:00
packages Fix strange whitespace (or I do not know YAML) 2022-04-24 22:38:59 +02:00
programs Fix server reload on port change (do not wait for current connections) 2022-05-16 16:22:58 +03:00
src Merge pull request #37021 from excitoon-favorites/fixtdigest 2022-05-16 15:21:59 +02:00
tests tests/integration/test_server_reload: add pylint hints 2022-05-16 16:22:58 +03:00
tools/clickhouse-diagnostics Style fixes 2022-04-29 09:21:05 +01:00
utils Add dependencies and CI for changelogs generator 2022-05-10 11:25:38 +02:00
website Add benchmark from some POWER machine 2022-05-10 05:12:52 +02:00
.clang-format add BeforeLambdaBody to .clang-format 2022-02-11 16:51:45 +01:00
.clang-tidy Enable clang-tidy modernize-deprecated-headers & hicpp-deprecated-headers 2022-05-09 08:23:33 +02:00
.editorconfig
.gitattributes mark test data as binary 2022-01-22 03:19:47 +03:00
.gitignore Add cmake page back to docs && fix /settings/settings in /zh 2022-04-24 16:47:19 -06:00
.gitmodules Merge branch 'master' into array-distance-functions 2022-05-11 16:55:02 +02:00
.pylintrc
.vimrc
.yamllint Drop truthy.check-keys from yamllint (does not supported on CI) 2021-02-21 06:15:36 +03:00
AUTHORS
CHANGELOG.md Update CHANGELOG.md 2022-05-05 01:52:45 +03:00
CMakeLists.txt Cosmetics 2022-05-15 16:07:10 +02:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Mention ClickHouse CLA in CONTRIBUTING.md (#32697) 2021-12-14 03:47:19 +03:00
format_sources
LICENSE Update year 2022-01-27 01:01:27 +03:00
PreLoad.cmake Relax cmake check for CFLAGS/CXXFLAGS/LDFLAGS 2022-05-03 14:59:03 +03:00
README.md Move codebrowser out of Yandex 2022-03-01 20:15:43 +01:00
SECURITY.md Update SECURITY.md (#35375) 2022-03-18 00:35:03 +03:00

ClickHouse — open source distributed column-oriented DBMS

ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time.

  • Official website has a quick high-level overview of ClickHouse on the main page.
  • Tutorial shows how to set up and query a small ClickHouse cluster.
  • Documentation provides more in-depth information.
  • YouTube channel has a lot of content about ClickHouse in video format.
  • Slack and Telegram allow chatting with ClickHouse users in real-time.
  • Blog contains various ClickHouse-related articles, as well as announcements and reports about events.
  • Code Browser (Woboq) with syntax highlight and navigation.
  • Code Browser (github.dev) with syntax highlight, powered by github.dev.
  • Contacts can help to get your questions answered if there are any.