You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/11/09 03:23:41 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on pull request #6744: [Bug][SnowFlakeUtils] fix snowFlake bug

ruanwenjun commented on pull request #6744:
URL: https://github.com/apache/dolphinscheduler/pull/6744#issuecomment-963782390


   > > LGTM.
   > > It seems we don't need to calculate the `| machineId << MACHINE_LEFT` in line 73 every time? I am not sure if java compiler will do this optimization, but it should be a constant?
   > 
   > I think it should not be a constant, this is related to the current machine, `MACHINE_BIT = 2` can support four machines of api server
   
   Yes, I mean when we can calculate in the constructor, and then we can avoid calculate in each time execute nextId.
   This is not a problem, this does not affect performance.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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