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 2020/07/02 12:12:42 UTC

[GitHub] [shardingsphere] automvc opened a new issue #6242: The ID generated by snowflake algorithm would jumps and discontinuity. Serial ID is more suitable.

automvc opened a new issue #6242:
URL: https://github.com/apache/shardingsphere/issues/6242


   
   The ID generated by snowflake algorithm strongly depends on clock. If Id is not generated at a certain time point, it will cause ID discontinuity; the longer the time is useless, the more serious the ID number jumps.
   
   As the table primary key of DB, continuous ID is more suitable.
   Reference for implementation of weak colck dependent and colck independent continuous ID algorithm:
   
   https://github.com/automvc/honey/blob/master/src/main/java/org/teasoft/honey/distribution/SerialUniqueId.java
   https://github.com/automvc/honey/blob/master/src/main/java/org/teasoft/honey/distribution/OneTimeSnowflakeId.java
   
   


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



[GitHub] [shardingsphere] kimmking closed issue #6242: The ID generated by snowflake algorithm would jumps and discontinuity. Serial ID is more suitable.

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #6242:
URL: https://github.com/apache/shardingsphere/issues/6242


   


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



[GitHub] [shardingsphere] kimmking edited a comment on issue #6242: The ID generated by snowflake algorithm would jumps and discontinuity. Serial ID is more suitable.

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #6242:
URL: https://github.com/apache/shardingsphere/issues/6242#issuecomment-652987630


   The reliability of ID generator is rather than continuity.
   So we havn't any plan to improve existing algorithm with new approach.
   But you can improve it by yourself.


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



[GitHub] [shardingsphere] kimmking edited a comment on issue #6242: The ID generated by snowflake algorithm would jumps and discontinuity. Serial ID is more suitable.

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #6242:
URL: https://github.com/apache/shardingsphere/issues/6242#issuecomment-652987630


   The reliability of ID generator is rather than continuity.
   So we havn't any plan to improve existing algorithm with new approach.
   But you can improve it by yourself.
   
   If you are insterested at this feature, you can open an new issue to describe how it works and you can archieve 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.

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



[GitHub] [shardingsphere] kimmking commented on issue #6242: The ID generated by snowflake algorithm would jumps and discontinuity. Serial ID is more suitable.

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


   Can you make a pr to integrate this new ID generator? @automvc 


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