Skip to content

Conversation

GeorgH93
Copy link

This pull request adds the new UUID version added by RFC 9562.
Added new UUID version enumerations:

  • time_reordered (version 6): Introduces a sortable time-based UUID format
  • time_unix (version 7): Provides a privacy-friendly time-based UUID generation method using unix time
  • custom (version 8): Reserved for vendor-specific UUID implementations

Copy link
Contributor

@boris-kolpackov boris-kolpackov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally to the inline changes, I don't see you handling the new versions when generated.

Specifically, we need to decide whether they are strong. I think v6 and v7 are expected to be strong while v8 may not be.

I suggest that you grep the source for all uses of uuid_version and see if something needs to be added for new versions.

md5 = 3, // Name-based with MD5 hashing.
random = 4, // Randomly or pseudo-randomly generated.
sha1 = 5, // Name-based with SHA1 hashing.
reordered_time = 6, // Sortable Time-based (RFC9562)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Sortable time-based (RFC9562).

random = 4, // Randomly or pseudo-randomly generated.
sha1 = 5, // Name-based with SHA1 hashing.
reordered_time = 6, // Sortable Time-based (RFC9562)
unix_time = 7, // Privacy friendly time based (RFC9562)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Unix Epoch time-based (RFC9562).

sha1 = 5, // Name-based with SHA1 hashing.
reordered_time = 6, // Sortable Time-based (RFC9562)
unix_time = 7, // Privacy friendly time based (RFC9562)
custom = 8, // Custom vendor specific (RFC9562)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Custom format for experimental or vendor-specific use (RFC9562).

Also, please drop the comma.

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.

2 participants