We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 zookeeper分配workerId多节点同时启动时存在并发安全问题,存在多个节点分配同一个workerId的bug
问题出现步骤 参考如下示例:
期望结果 每个节点分配的机器位不相同
实际结果 我这边生产环境中碰到两个节点被分配了相同机器位,一个节点index为31创建session node成功,另外一个节点index也为31进来,删除了节点后,重新创建
The text was updated successfully, but these errors were encountered:
bugfix [issue #27] zookeeper分配workerId多节点同时启动时存在并发安全问题
797b499
update 优化部分代码
No branches or pull requests
问题描述
zookeeper分配workerId多节点同时启动时存在并发安全问题,存在多个节点分配同一个workerId的bug
问题出现步骤
参考如下示例:
if (addSessionNode(workerNodePathTem)) {
savePath(index);
return true;
}
}
此代码块存在并发问题,多个节点启动时会存在分配相同workerId的情况,导致不同节点生成id重复
期望结果
每个节点分配的机器位不相同
实际结果
我这边生产环境中碰到两个节点被分配了相同机器位,一个节点index为31创建session node成功,另外一个节点index也为31进来,删除了节点后,重新创建
The text was updated successfully, but these errors were encountered: