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/25 14:09:29 UTC

[GitHub] [incubator-shardingsphere] terrymanu commented on a change in pull request #3595: Update snowflake algorithm to support modulus of 2^n

terrymanu commented on a change in pull request #3595: Update snowflake algorithm to support modulus of 2^n 
URL: https://github.com/apache/incubator-shardingsphere/pull/3595#discussion_r350196386
 
 

 ##########
 File path: sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/keygen/SnowflakeShardingKeyGenerator.java
 ##########
 @@ -130,13 +134,19 @@ private boolean waitTolerateTimeDifferenceIfNeed(final long currentMilliseconds)
     }
     
     private long getWorkerId() {
-        long result = Long.valueOf(properties.getProperty("worker.id", String.valueOf(WORKER_ID)));
+        long result = Long.parseLong(properties.getProperty("worker.id", String.valueOf(WORKER_ID)));
 
 Review comment:
   Why modify this, is it related with this issue?

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