提交 0e633ba2 编写于 作者: zlt2000's avatar zlt2000

优化分布式id逻辑

上级 edc02e49
......@@ -173,7 +173,6 @@ public class Sequence {
// 相同毫秒内,序列号自增
sequence = (sequence + 1) & sequenceMask;
if (sequence == 0) {
sequence = ThreadLocalRandom.current().nextLong(1, 101);
// 同一毫秒的序列数已经达到最大
timestamp = tilNextMillis(lastTimestamp);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册