3.8K Star 12.7K Fork 4.7K

卓源软件 / JeeSite 4.3

 / 详情

【BUG】集群部署下多个节点可能产生相同的ID

Backlog
Opened this issue  
2021-09-15 14:03

IdGen中的IdWorker idWorker = new IdWorker(-1, -1);
其中workerId和datacenterID不应为静态

Comments (2)

zpsw created任务
zpsw set related repository to 卓源软件/JeeSite 4.3
Expand operation logs

-1 代表随机生成 workid dcid,重复几率非常小,目前集群部署还未发现有重复的情况。

还是会有隐患,如果集群部署肯定需要redis存储session,这种情况下可以通过redis维护workid,dcid唯一

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
6732 thinkgem 1578914432
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.3

Search