为啥不把delta seconds和worker id换个位置?
Open
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
CachedUidGenerator有可能使用未来到时间,(对于单个实例应用来说)当服务立刻重启后,worker id+1,但是开始时间有可能回到上次的最大时间之前,导致生产的Uid不是单调递增的
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading CachedUidGenerator and its handling of delta seconds, worker ID, and restart state. Reproduce the immediate-restart scenario described in the issue and inspect whether generated UIDs can move backward. Done means the proposed layout change is evaluated and the generator preserves monotonic ordering for a single instance after restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100