Skip to content

Conversation

@g-kenkun
Copy link

The ID that is finally generated is 64 bits, but the ID generated in the process is time stamp (41 bits) machine ID (12 bits) sequence (12 bits) = 63 bits, with a leading zero. 😄 (I don't know scala well, but when I look at the source code, it looks like this. )

Set the first bit to 0 and change timestamp to 41bit according to the specifications of snowflake.
@g-kenkun g-kenkun requested a review from weixiyen January 22, 2020 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant