mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix race, fix attempt to write ti canceled socket
This commit is contained in:
parent
e2ea19f37a
commit
999aced7c9
@ -800,6 +800,12 @@ void TCPHandler::runImpl()
|
||||
if (thread_trace_context)
|
||||
thread_trace_context->root_span.addAttribute(*exception);
|
||||
|
||||
if (query_state->raw_out->isCanceled())
|
||||
{
|
||||
tryLogCurrentException(log, "Can't send logs or exception to client. Close connection.");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
LOG_DEBUG(log, "try send logs");
|
||||
@ -1225,7 +1231,10 @@ void TCPHandler::processOrdinaryQuery(QueryState & state)
|
||||
while (executor.pull(block, interactive_delay / 1000))
|
||||
{
|
||||
|
||||
receivePacketsExpectCancel(state);
|
||||
{
|
||||
std::lock_guard lock(callback_mutex);
|
||||
receivePacketsExpectCancel(state);
|
||||
}
|
||||
|
||||
if (state.stop_read_return_partial_result)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user