ClickHouse® is a real-time analytics DBMS
Go to file
Azat Khuzhin b0c862c297 Fix memory accounting for queries that uses < max_untracker_memory
MemoryTracker starts accounting memory directly only after per-thread
allocation exceeded max_untracker_memory (or memory_profiler_step).

But even memory under this limit should be accounted too, and there is
code to do this in ThreadStatus dtor, however due to
PullingAsyncPipelineExecutor detached the query from thread group that
memory was not accounted.

So remove CurrentThread::detachQueryIfNotDetached() from threads that
uses ThreadFromGlobalPool since it has ThreadStatus, and the query will
be detached using CurrentThread::defaultThreadDeleter.

Note, that before this patch memory accounting works for HTTP queries
due to it had been accounted from ParallelFormattingOutputFormat, but
not for TCP.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-28 16:25:33 +03:00
.github Launch docker images building on on-demand hosts 2022-01-24 15:56:18 +01:00
base Merge pull request #33201 from azat/client-interactive-suggest 2022-01-28 16:30:16 +07:00
benchmark Add benchmark for DuckDB 2021-10-31 21:05:07 +03:00
cmake Remove MAKE_STATIC_LIBRARIES (in favor of USE_STATIC_LIBRARIES) 2022-01-24 17:28:33 +03:00
contrib Merge branch 'master' into fix-orc 2022-01-27 18:22:52 +00:00
debian Disable dh_update_autotools_config 2022-01-18 20:10:38 +00:00
docker docker: fix root squashed data dirs 2022-01-26 14:29:27 +02:00
docs add chconn to Client Libraries 2022-01-27 14:28:04 +01:00
programs Merge pull request #33960 from Avogar/autodetect-format 2022-01-28 12:02:15 +03:00
src Fix memory accounting for queries that uses < max_untracker_memory 2022-01-28 16:25:33 +03:00
tests Merge pull request #33201 from azat/client-interactive-suggest 2022-01-28 16:30:16 +07:00
utils Add commands download clickhouse-diagnostics folder 2022-01-28 00:13:48 +03:00
website Add authors in blog 2022-01-27 01:18:11 +03:00
.clang-format Fixed wrong code around Memory Profiler 2020-03-03 03:24:44 +03:00
.clang-tidy Revert "Revert "Fix tidy"" 2021-09-06 12:16:52 +03:00
.editorconfig Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.gitattributes Cleanup .gitattributes 2021-12-11 21:27:36 +03:00
.gitignore Add more build paths to .gitignore 2022-01-18 15:25:48 +00:00
.gitmodules Change modules url 2022-01-27 09:36:50 +00:00
.potato.yml Fix yamllint issues 2021-02-20 23:25:21 +03:00
.pylintrc Add pylintrc config 2021-01-26 23:35:56 +03:00
.vimrc Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.yamllint Drop truthy.check-keys from yamllint (does not supported on CI) 2021-02-21 06:15:36 +03:00
AUTHORS Update AUTHORS 2021-09-22 11:38:03 +03:00
CHANGELOG.md Update CHANGELOG.md 2022-01-20 13:22:01 +03:00
CMakeLists.txt Merge pull request #33925 from benbiti/USE_DEBUG_HELPERS-OFF 2022-01-27 22:59:55 +03:00
CODE_OF_CONDUCT.md Add minimal code of conduct #9676 2020-03-16 12:44:28 +03:00
CONTRIBUTING.md Mention ClickHouse CLA in CONTRIBUTING.md (#32697) 2021-12-14 03:47:19 +03:00
docker-compose.yml Change Docker org name 2021-09-20 01:52:21 +03:00
format_sources allow several <graphite> targets (#603) 2017-03-21 23:08:09 +04:00
LICENSE Update year 2022-01-27 01:01:27 +03:00
PreLoad.cmake Hermetic shared build 2021-12-20 16:59:42 +08:00
README.md Update README.md 2022-01-21 00:32:56 +03:00
release Add aarch64 deb package 2021-12-16 12:42:49 +01:00
SECURITY.md Update SECURITY.md 2022-01-04 23:40:35 +03:00
uncrustify.cfg Better .clang-format and uncrustify.cfg 2018-11-29 15:45:34 +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.