tristaZero edited a comment on issue #2219: SnowflakeShardingKeyGenerator hava 
a bug 
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2219#issuecomment-485624089
 
 
   @traceless Hi,
   There two scenarios that we need to jump to next millSecond.
   First, sequences in one millSecond are used up, i.e, `0L == (sequence = 
(sequence + 1) & SEQUENCE_MASK)`. In this condition, all distributed IDs will 
not lean toward odd or even. Therefore, it is not necessary to 
`vibrateSequenceOffset()`.
   Second, one distributed ID every millSecond. In this condititon, we need to 
`vibrateSequenceOffset()` to avoid leaning toward even numbers.
   What's your opinion?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to