未验证 提交 1707cd79 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #5297 from github1youlc/xid_equal_to_close_xid_deadlock_fix

fix deadlock when xid equal to close_xid
......@@ -1430,6 +1430,8 @@ void ZooKeeper::pushRequest(RequestInfo && info)
if (!info.request->xid)
{
info.request->xid = next_xid.fetch_add(1);
if (info.request->xid == close_xid)
throw Exception("xid equal to close_xid", ZSESSIONEXPIRED);
if (info.request->xid < 0)
throw Exception("XID overflow", ZSESSIONEXPIRED);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册