Skip to content
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

Add custom node ids #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add custom node ids #107

wants to merge 2 commits into from

Conversation

tkarrass
Copy link

@tkarrass tkarrass commented Oct 3, 2022

In the current implementation, the generation of version 1 UUIDs using distinct node ids is only possible by sequentially calling "SetNodeID(…); NewUUID()" for each UUID to generate.
There also is no sort of locking for this workflow, so we might experience race conditions when generating UUIDs for distinct node ids simultaneously.

Additionally RFC-4122 section 4.5 suggests to set the u/m bit to 1, when using custom node ids in order to reliably avoid collisions with UUIDs created for node ids which are based on IEEE 802 addresses. This is not (and should not being) checked within the global SetNodeID(...) func.

So I decided to add a CustomNodeId type which enables this kind of usage in a clean way.

@tkarrass
Copy link
Author

tkarrass commented Nov 2, 2022

knock knock neo …

@tkarrass tkarrass requested a review from a team as a code owner December 1, 2023 16:36
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.

None yet

1 participant