Comments (2)
Without a bit of testing or a lot more thinking, I'm not sure 100% that you couldn't find some whacky mixture of node bits and step bits where you could create the same ID, though I think it's very unlikely. They would have to be made during the exact same millisecond and somehow have the node, and step bits be aligned too.
I would say, the uniqueness guarantee is for ID's created with the same NodeBits and StepBits settings.
You example above isn't valid though, the NodeBits + StepBits cannot be more than 22 total, that's the amount of space available to them.
from snowflake.
Thanks your reply. In theory, It will be a tiny chance to get the same id when stepBits run out in the same millisecond. Yes, it's better to create snowflakeID with same NodeBits and StepBits settings at the same project or cluster.
from snowflake.
Related Issues (20)
- What will happen if generate more than 4096 in 1 millisecond? HOT 1
- Why don't we use the method init() anywhere? HOT 1
- Generate unique node ID HOT 2
- How can i reduce the length of id? HOT 2
- Alternative to ID.Time()? HOT 2
- Feature request for bulk generation of IDs HOT 2
- How much does system time affect the algorithm and library? HOT 1
- 生成的ID会重复 HOT 6
- 生成得id都是偶数 HOT 1
- parsing doesn't consider negative numbers HOT 1
- Android Log: März 29, 2022 07:23:09 GMT+02:00
- Data skew in low-concurrency scenarios HOT 4
- Why do we need the nodeMax? HOT 3
- Why not support hexadecimal?
- Why DEPRECATED for func Time? HOT 4
- Version latest released version as v1.0.0 HOT 1
- Base64 should encode bytes rather than string representation of int64 HOT 1
- Snow
- If it is the same timestamp, the generated IDs will be the same
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowflake.