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 2022/11/25 14:14:31 UTC

[GitHub] [shardingsphere] chenyongyin opened a new issue, #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 0 or 1 after modulo 16?

chenyongyin opened a new issue, #22424:
URL: https://github.com/apache/shardingsphere/issues/22424

   version:5.0.0-alpha
   question:
   shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?

Posted by GitBox <gi...@apache.org>.
zhaojinchao95 commented on issue #22424:
URL: https://github.com/apache/shardingsphere/issues/22424#issuecomment-1327997601

   @chenyongyin Can you use `ShardingSphere`` 5.2.1`  and try it?


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN closed issue #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?
URL: https://github.com/apache/shardingsphere/issues/22424


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #22424:
URL: https://github.com/apache/shardingsphere/issues/22424#issuecomment-1364839795

   Close due to no response.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on issue #22424: shardingsphere uses snowflake algorithm to generate primary key. Why can it only generate the value of 1 or 2 after modulo 16?

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #22424:
URL: https://github.com/apache/shardingsphere/issues/22424#issuecomment-1342340275

   Hi @chenyongyin , I checked `SnowflakeKeyGenerateAlgorithm.generateKey()`, `sequence` will increase `1` in every call.
   
   What's the system TPS? Maybe it's too small. Since snowflake algorithm generated id will be changed in every millisecond.
   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org