Skip to content

Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1#22183

Merged
Avogar merged 1 commit intoClickHouse:masterfrom
azat:async_socket_for_remote-query-cancel-on-timeout-fix
Mar 29, 2021
Merged

Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1#22183
Avogar merged 1 commit intoClickHouse:masterfrom
azat:async_socket_for_remote-query-cancel-on-timeout-fix

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Mar 26, 2021

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1

Detailed description / Documentation draft:
In #21643 async_socket_for_remote=1 was fixed to avoid leaving the
connection in the unsynchronised state.

But one should not try to wait for the current packet in case of timeout
because this will exceed the timeout.

Anyway if the timeout is exceeded, then the connection will be shutdown
(disconnected), so it will not left in an unsynchronised state.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Mar 26, 2021
@Avogar Avogar self-assigned this Mar 26, 2021
…r_remote=1

In ClickHouse#21643 async_socket_for_remote=1 was fixed to avoid leaving the
connection in the unsynchronised state.

But one should not try to wait for the current packet in case of timeout
because this will exceed the timeout.

Anyway if the timeout is exceeded, then the connection will be shutdown
(disconnected), so it will not left in an unsynchronised state.
@azat azat force-pushed the async_socket_for_remote-query-cancel-on-timeout-fix branch from 1663b0e to 82c79fe Compare March 26, 2021 18:24
@azat
Copy link
Copy Markdown
Member Author

azat commented Mar 27, 2021

Stress test (thread) — Fatal message in clickhouse-server.log

2021.03.26 23:28:43.762456 [ 295 ] {} <Fatal> Application: Child process was terminated by signal 9 (KILL). If it is not done by 'forcestop' command or manually, the possible cause is OOM Killer (see 'dmesg' and look at the '/var/log/kern.log' for the details).

@Avogar Avogar merged commit 6d60f2e into ClickHouse:master Mar 29, 2021
robot-clickhouse pushed a commit that referenced this pull request Mar 29, 2021
@azat azat deleted the async_socket_for_remote-query-cancel-on-timeout-fix branch March 29, 2021 17:13
alexey-milovidov added a commit that referenced this pull request Apr 1, 2021
Backport #22183 to 21.3: Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1
robot-clickhouse pushed a commit that referenced this pull request Apr 2, 2021
robot-clickhouse pushed a commit that referenced this pull request Apr 2, 2021
alexey-milovidov added a commit that referenced this pull request Apr 3, 2021
Backport #22183 to 21.2: Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1
Avogar added a commit that referenced this pull request Apr 3, 2021
Backport #22183 to 21.1: Fix query cancellation with use_hedged_requests=0 and async_socket_for_remote=1
@azat azat mentioned this pull request Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants