Merge pull request #56035 from azat/fix-send-receive-timeout

Do not mix-up send_timeout and receive_timeout
This commit is contained in:
Alexey Milovidov 2023-10-30 20:59:26 +01:00 committed by GitHub
commit dbd97726f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,10 +377,7 @@ void TCPHandler::runImpl()
extractConnectionSettingsFromContext(query_context); extractConnectionSettingsFromContext(query_context);
/// Sync timeouts on client and server during current query to avoid dangling queries on server /// Sync timeouts on client and server during current query to avoid dangling queries on server
/// NOTE: We use send_timeout for the receive timeout and vice versa (change arguments ordering in TimeoutSetter), state.timeout_setter = std::make_unique<TimeoutSetter>(socket(), send_timeout, receive_timeout);
/// because send_timeout is client-side setting which has opposite meaning on the server side.
/// NOTE: these settings are applied only for current connection (not for distributed tables' connections)
state.timeout_setter = std::make_unique<TimeoutSetter>(socket(), receive_timeout, send_timeout);
/// Should we send internal logs to client? /// Should we send internal logs to client?
const auto client_logs_level = query_context->getSettingsRef().send_logs_level; const auto client_logs_level = query_context->getSettingsRef().send_logs_level;