You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/04/23 03:23:16 UTC

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #2219: SnowflakeShardingKeyGenerator hava a bug

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, we will change to next millSecond.
   First, sequences 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 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:
users@infra.apache.org


With regards,
Apache Git Services