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

时钟回滚会导致重复发号,这种方案相对于原始snowflake的优势是什么 #10

Open
nju-Nicko opened this issue Sep 4, 2020 · 2 comments

Comments

@nju-Nicko
Copy link

No description provided.

@nju-Nicko nju-Nicko reopened this Sep 4, 2020
@nju-Nicko
Copy link
Author

感觉应该在lua脚本里记录tag, partition维度的上次生成id时的时间戳,每次生成id的时候当前time和这个时间戳对比,小于则报错

@hengyunabc
Copy link
Owner

简单,易部署,易理解,多语言接入无成本。部署redis的机器关掉 ntp 同步即可。

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