-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Uid] fix performance and prevent collisions with the real clock_seq #41693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Do you have numbers to share? 😁 |
Yes, you need to see my talk :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a way to promote your talk.
57e7a1f
to
bf75bd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now with another bugfix: when a time is passed to generate a V1 or V6 UUID, the clock_seq is borrowed from the node if one is also set, or a static one is randomly generated otherwise.
This prevents any potential collisions with the real current clock seq.
For my understanding: The fix is that you prevent validating the same UUID/ULID twice when initializing them with |
Absolutely! |
…th base32 values (fancyweb) This PR was merged into the 5.3 branch. Discussion ---------- [Uid] Prevent double validation in Uuid::fromString() with base32 values | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Follow up to #41693, it should be a little bit faster if we don't validate twice, right? Commits ------- 043ee56 [Uid] Prevent double validation in Uuid::fromString() with base32 values
Spotted while preparing my talk.