Skip to content
New issue

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

BaseTime+WorkerId问题 #87

Open
ap0405140 opened this issue Jan 18, 2024 · 1 comment
Open

BaseTime+WorkerId问题 #87

ap0405140 opened this issue Jan 18, 2024 · 1 comment

Comments

@ap0405140
Copy link

ap0405140 commented Jan 18, 2024

有2个应用程序, 希望各自产生的ID不跟另一个应用程序产生的重复, 是不是设置WorkerId不同即可?
如果2边设置的BaseTime不一致, 是否可能产生什么问题?

@yitter
Copy link
Owner

yitter commented Jan 20, 2024

首先保证2个参数设置一样:WorkerIdBitLength 、SeqBitLength。
其次确保WorkerId不同。
满足上述2个条件后,BaseTime可以不同,但建议相同。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants