php-snowflake icon indicating copy to clipboard operation
php-snowflake copied to clipboard

🐜 Update random sequence resolve to use real random

Open godruoyi opened this issue 3 years ago • 1 comments

godruoyi avatar Sep 17 '22 10:09 godruoyi

Codecov Report

Base: 99.28% // Head: 99.32% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (062f7f7) compared to base (550e3af). Patch coverage: 93.75% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #37      +/-   ##
============================================
+ Coverage     99.28%   99.32%   +0.03%     
- Complexity       51       53       +2     
============================================
  Files             6        6              
  Lines           140      148       +8     
============================================
+ Hits            139      147       +8     
  Misses            1        1              
Impacted Files Coverage Δ
src/LaravelSequenceResolver.php 100.00% <ø> (ø)
src/RedisSequenceResolver.php 100.00% <ø> (ø)
src/Sonyflake.php 97.87% <88.88%> (+0.31%) :arrow_up:
src/RandomSequenceResolver.php 100.00% <100.00%> (ø)
src/Snowflake.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Sep 17 '22 10:09 codecov-commenter

刚好发现,线上所有snowflake id的sequence都是0 。。。

tourze avatar Oct 23 '22 07:10 tourze

Yes, the previous algorithm seems to have problems, you can try to update to 2.1.0 and try again. any questions, please let me know.

godruoyi avatar Oct 23 '22 15:10 godruoyi