Skip to content

Use Guid.CreateVersion7#19436

Open
hishamco wants to merge 2 commits into
mainfrom
hishamco/guid
Open

Use Guid.CreateVersion7#19436
hishamco wants to merge 2 commits into
mainfrom
hishamco/guid

Conversation

@hishamco

Copy link
Copy Markdown
Member

No description provided.

@hishamco hishamco requested a review from Skrypt June 21, 2026 22:13
@gvkries

gvkries commented Jun 22, 2026

Copy link
Copy Markdown
Member

I’m not convinced this change provides a meaningful benefit. UUID v7 is only really useful when its ordering characteristics matter, for example in scenarios like database indexes. That does not seem to apply to our usages here, where values such as IDs are typically only consumed via their string representation, so the ordering aspect has no practical effect in our code.

In addition, UUID v7 is not a generic replacement for the version currently produced by Guid.NewGuid(). It trades away some randomness to gain time-ordering, which can make it a worse fit for more general-purpose values, including pseudo-security-sensitive uses such as secrets or tokens.

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