Fix race on zk_log

This commit is contained in:
Alexander Gololobov 2023-11-17 12:42:06 +01:00
parent 117930f914
commit 45b6956601

View File

@ -1147,7 +1147,8 @@ void ZooKeeper::pushRequest(RequestInfo && info)
{
checkSessionDeadline();
info.time = clock::now();
if (zk_log)
auto maybe_zk_log = std::atomic_load(&zk_log);
if (maybe_zk_log)
{
info.request->thread_id = getThreadId();
info.request->query_id = String(CurrentThread::getQueryId());