mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Better name [#CLICKHOUSE-3753]
This commit is contained in:
parent
6eb43fe9e9
commit
515bd29df7
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user