mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Rewriting ZooKeeper library [#CLICKHOUSE-2]
This commit is contained in:
parent
c8f8dc429c
commit
644c5e67b6
@ -1088,7 +1088,11 @@ void ZooKeeper::pushRequest(RequestInfo && info)
|
||||
info.request->addRootPath(root_path);
|
||||
|
||||
if (!info.request->xid)
|
||||
{
|
||||
info.request->xid = xid.fetch_add(1);
|
||||
if (info.request->xid < 0)
|
||||
throw Exception("XID overflow");
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard lock(operations_mutex);
|
||||
|
@ -476,7 +476,7 @@ private:
|
||||
std::optional<ReadBufferFromPocoSocket> in;
|
||||
std::optional<WriteBufferFromPocoSocket> out;
|
||||
|
||||
std::atomic<XID> xid {1}; /// TODO deal with xid overflow
|
||||
std::atomic<XID> xid {1};
|
||||
|
||||
struct RequestInfo
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user