ClickHouse® is a real-time analytics DBMS
Go to file
Azat Khuzhin 83d68246c3 Fix LOGICAL_ERROR on connection draining in case of ECONNRESET
In case of ECONNRESET (Connection reset by peer) the "cancelled" will
not be set, and so drain() will fail with LOGICAL_ERROR:

<details>

    2021.10.16 04:10:55.054771 [ 7635 ] {882164e0-ca26-4955-8759-708ba1f6e85c} <Error> PullingAsyncPipelineExecutor: Code: 210. DB::NetException: Connection reset by peer, while writing to socket (127.0.0.2:9000). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):

    ...
    4. ./obj-x86_64-linux-gnu/../src/Common/NetException.h:12: DB::NetException::NetException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x20db5749 in /usr/bin/clickhouse
    5. ./obj-x86_64-linux-gnu/../src/IO/WriteBufferFromPocoSocket.cpp:56: DB::WriteBufferFromPocoSocket::nextImpl() @ 0x211d56bb in /usr/bin/clickhouse
    6. ./obj-x86_64-linux-gnu/../src/IO/WriteBuffer.h:47: DB::WriteBuffer::next() @ 0x14e4c874 in /usr/bin/clickhouse
    7. ./obj-x86_64-linux-gnu/../src/Client/Connection.cpp:560: DB::Connection::sendCancel() @ 0x227c0c22 in /usr/bin/clickhouse
    8. ./obj-x86_64-linux-gnu/../src/Client/HedgedConnections.cpp:242: DB::HedgedConnections::sendCancel() @ 0x227f1b53 in /usr/bin/clickhouse
    ...
    2021.10.16 04:12:35.555530 [ 5575 ] {} <Fatal> : Logical error: 'Cannot drain connections: cancel first.'.

</details>

Found by stress tests on CI [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/0/d3cb99701d4aaec384fd183168d10e0f650ecc1d/stress_test_(debug).html#fail1
2021-10-23 22:44:32 +03:00
.github Trying aws secrets 2021-10-20 14:48:27 +03:00
base Merge pull request #30143 from amosbird/useupstreamreplxx 2021-10-19 17:50:43 +03:00
benchmark Minor modification in hardware benchmark 2021-10-18 02:09:41 +03:00
cmake Merge pull request #30014 from jinjunzh/master 2021-10-22 14:16:47 +03:00
contrib Merge branch 'master' into reorganiza-contrib-ide-folders 2021-10-19 15:32:57 +00:00
debian Add lld into Build-Depends for debian package 2021-09-25 02:18:36 +03:00
docker Merge pull request #28851 from ClickHouse/trying_actions 2021-10-20 12:55:53 +03:00
docs Update settings.md 2021-10-23 22:30:42 +03:00
programs Add placeholder to play.html inputs 2021-10-21 18:49:20 +03:00
src Fix LOGICAL_ERROR on connection draining in case of ECONNRESET 2021-10-23 22:44:32 +03:00
tests Merge pull request #30266 from CurtizJ/aggregation-in-order-4 2021-10-23 18:09:17 +03:00
utils Merge branch 'master' into trying_actions 2021-10-19 17:45:37 +03:00
website Add hardware benchmark on Macbook Pro M1 2020 2021-10-22 12:28:51 -06: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 Union merge for arcadia_skip_list.txt to avoid frequent conflicts 2021-03-10 08:50:32 +03:00
.gitignore fix style check 2021-09-21 10:28:33 +03:00
.gitmodules Merge pull request #30143 from amosbird/useupstreamreplxx 2021-10-19 17:50:43 +03: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 2021-10-15 22:37:25 +03:00
CMakeLists.txt Merge pull request #30248 from ClickHouse/musl-4 2021-10-16 18:44:35 +03:00
CODE_OF_CONDUCT.md Add minimal code of conduct #9676 2020-03-16 12:44:28 +03:00
CONTRIBUTING.md Remove old CLA 2021-09-28 20:16:33 +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 Sync copyrights 2021-10-04 09:16:18 +03:00
PreLoad.cmake Check if XCODE_IDE is true and avoid enforcing ninja in that case 2021-01-06 03:06:03 +04:00
README.md Update README.md 2021-10-12 15:38:40 +03:00
release Proper build 2021-08-24 00:09:19 +00:00
SECURITY.md Update SECURITY.md 2021-10-07 20:30:07 +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 with syntax highlight and navigation.
  • Contacts can help to get your questions answered if there are any.