Better name [#CLICKHOUSE-3753]

This commit is contained in:
Alexey Milovidov 2018-05-31 22:28:30 +03:00 committed by Alexey Zatelepin
parent ce12f0b37c
commit 81a505ad64
2 changed files with 3 additions and 4 deletions

View File

@ -997,8 +997,7 @@ void ZooKeeper::receiveEvent()
void ZooKeeper::finalize(bool error_send, bool error_receive)
{
{
/// Will wait for pushRequest method.
std::unique_lock lock(expired_mutex);
std::unique_lock lock(push_request_mutex);
if (expired)
return;
@ -1350,7 +1349,7 @@ void ZooKeeper::pushRequest(RequestInfo && info)
/// to avoid forgotten operations in the queue when session is expired.
/// Invariant: when expired, no new operations will be pushed to the queue in 'pushRequest'
/// and the queue will be drained in 'finalize'.
std::lock_guard lock(expired_mutex);
std::lock_guard lock(push_request_mutex);
if (expired)
throw Exception("Session expired", ZSESSIONEXPIRED);

View File

@ -573,7 +573,7 @@ private:
std::atomic<XID> xid {1};
std::atomic<bool> expired {false};
std::mutex expired_mutex;
std::mutex push_request_mutex;
using clock = std::chrono::steady_clock;