Skip to content

Conversation

@aevitas
Copy link
Owner

@aevitas aevitas commented Sep 6, 2025

Fixes #23 #24 and #25 -- see these issues for more details.

This pull request implements synchronization (without locking!) around the last generated ID, ensuring subsequent IDs are both unique, and sortable.

Implementing these changes brings the implementation more in line with established Snowflake guidelines.

@aevitas aevitas self-assigned this Sep 6, 2025
@aevitas
Copy link
Owner Author

aevitas commented Sep 6, 2025

@jakobbotsch Could you have a look at the CompareExchange code around Id.cs line 190?

@aevitas aevitas merged commit c59617c into master Sep 10, 2025
1 check passed
@aevitas aevitas deleted the fix/increment branch September 10, 2025 12:12
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.

Increment overflows potentially causes collisions

2 participants