From 0db5958ce118eafe5103c63f24d9c49b8bbaeeaa Mon Sep 17 00:00:00 2001 From: yitter Date: Tue, 13 Apr 2021 15:17:24 +0800 Subject: [PATCH] auto commit --- C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs | 2 +- Go/source/idgen/SnowWorkerM1.go | 2 +- Rust/source/src/idgen/snow_worker_m1.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs b/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs index f814551..0c639e3 100644 --- a/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs +++ b/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs @@ -274,7 +274,7 @@ namespace Yitter.IdGenerator _TurnBackIndex++; // 每毫秒序列数的前5位是预留位,0用于手工新值,1-4是时间回拨次序 - // 最多4次回拨(防止回拨重叠) + // 支持4次回拨次序(避免回拨重叠导致ID重复),可无限次回拨(次序循环使用)。 if (_TurnBackIndex > 4) { _TurnBackIndex = 1; diff --git a/Go/source/idgen/SnowWorkerM1.go b/Go/source/idgen/SnowWorkerM1.go index 7e32f4d..e60807d 100644 --- a/Go/source/idgen/SnowWorkerM1.go +++ b/Go/source/idgen/SnowWorkerM1.go @@ -170,7 +170,7 @@ func (m1 *SnowWorkerM1) NextNormalId() int64 { m1._TurnBackTimeTick = m1._LastTimeTick - 1 m1._TurnBackIndex++ // 每毫秒序列数的前5位是预留位,0用于手工新值,1-4是时间回拨次序 - // 最多4次回拨(防止回拨重叠) + // 支持4次回拨次序(避免回拨重叠导致ID重复),可无限次回拨(次序循环使用)。 if m1._TurnBackIndex > 4 { m1._TurnBackIndex = 1 } diff --git a/Rust/source/src/idgen/snow_worker_m1.rs b/Rust/source/src/idgen/snow_worker_m1.rs index 750eaba..75ba4eb 100644 --- a/Rust/source/src/idgen/snow_worker_m1.rs +++ b/Rust/source/src/idgen/snow_worker_m1.rs @@ -206,7 +206,7 @@ impl SnowWorkerM1 { self._TurnBackIndex += 1; // 每毫秒序列数的前5位是预留位,0用于手工新值,1-4是时间回拨次序 - // 最多4次回拨(防止回拨重叠) + // 支持4次回拨次序(避免回拨重叠导致ID重复),可无限次回拨(次序循环使用)。 if self._TurnBackIndex > 4 { self._TurnBackIndex = 1; }