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

Does COMB have Year 2059 Problem? #392

Closed
mpyw opened this issue Oct 28, 2021 · 3 comments
Closed

Does COMB have Year 2059 Problem? #392

mpyw opened this issue Oct 28, 2021 · 3 comments
Labels

Comments

@mpyw
Copy link

mpyw commented Oct 28, 2021

UUIDs generated by CombGenerator (called as Ordered UUID in Laravel) contains a 48-bit timestamp, but its precise is on the order of 10 microseconds.

(2^48)/(86400*100000*365) + 1970 ≈ 2059

It means that in 2059, we will spend all reserved spaces for orderd UUIDs. Is it already recognized by contributors and users?


NOTE: ULID, which is a similar concept, claims that space will not be exhausted until the year 10889 because it is on the order of milliseconds.

@mpyw mpyw added the question label Oct 28, 2021
@mpyw mpyw changed the title Is COMB has Year 2059 Problem? Does COMB have Year 2059 Problem? Oct 28, 2021
@mpyw
Copy link
Author

mpyw commented Nov 1, 2021

Currently I'm planning to use @robinvdvleuten's robinvdvleuten/php-ulid through mpyw/uuid-ulid-converter to avoid this problem.

@ramsey
Copy link
Owner

ramsey commented Nov 2, 2021

@mpyw, sounds good. I can't change UUIDs to fix this problem. Someone will need to develop alternatives, like ULID.

I've considered adding ULIDs to this library, but since other libraries exist that provide them, it hasn't been a priority.

@ramsey ramsey closed this as completed Nov 2, 2021
@donnysim
Copy link

@ramsey other implementations of ULID don't support binary, so maybe there's a chance you'd want to re-evaluate adding ULID support? I trust your implementations more than the others 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants