You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/05 10:00:36 UTC

[GitHub] [incubator-shardingsphere] haetao edited a comment on issue #3422: version 4.0.0-RC2: key generated by SnowflakeShardingKeyGenerator mod 4 always is 0/1, expected 0/1/2/3

haetao edited a comment on issue #3422: version 4.0.0-RC2: key generated by SnowflakeShardingKeyGenerator mod 4 always is 0/1, expected 0/1/2/3
URL: https://github.com/apache/incubator-shardingsphere/issues/3422#issuecomment-549745218
 
 
   Since the SnowflakeShardingKeyGenerator has a left shift operation when generating a number at different timestamps, the remainder is always 0 or 1 when this number is used to modulate a number of 2^n(your number is 4).

----------------------------------------------------------------
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