mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Update InternalProfileEventsQueue usage
This commit is contained in:
parent
c1f3e7e0bb
commit
3a0764634e
@ -395,11 +395,9 @@ std::optional<Block> RemoteQueryExecutor::processPacket(Packet packet)
|
||||
|
||||
case Protocol::Server::ProfileEvents:
|
||||
/// Pass profile events from remote server to client
|
||||
{
|
||||
auto profile_queue = CurrentThread::getInternalProfileEventsQueue();
|
||||
if (auto profile_queue = CurrentThread::getInternalProfileEventsQueue())
|
||||
profile_queue->emplace(std::move(packet.block));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
got_unknown_packet_from_replica = true;
|
||||
|
@ -246,8 +246,11 @@ void TCPHandler::runImpl()
|
||||
sendLogs();
|
||||
});
|
||||
}
|
||||
state.profile_queue = std::make_shared<InternalProfileEventsQueue>(std::numeric_limits<int>::max());
|
||||
CurrentThread::attachInternalProfileEventsQueue(state.profile_queue);
|
||||
if (client_tcp_protocol_version >= DBMS_MIN_PROTOCOL_VERSION_WITH_PROFILE_EVENTS)
|
||||
{
|
||||
state.profile_queue = std::make_shared<InternalProfileEventsQueue>(std::numeric_limits<int>::max());
|
||||
CurrentThread::attachInternalProfileEventsQueue(state.profile_queue);
|
||||
}
|
||||
|
||||
query_context->setExternalTablesInitializer([this] (ContextPtr context)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user