IDWork icon indicating copy to clipboard operation
IDWork copied to clipboard

算法有问题,左移都不对

Open 52fhy opened this issue 4 years ago • 0 comments

算法有问题。

static $workerIdShift = 10;
static $timestampLeftShift = 14;

这个应该分别是:

static $workerIdShift = 22;
static $timestampLeftShift = 12;

因为: 63 - 41 =22 63 - 51 = 12

另外,10个机器位,为什么要限制机器ID 小于15?小于 1024就行了。

52fhy avatar Oct 24 '19 13:10 52fhy