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
Uuid v7 generated in wrong order #536
Comments
Another wrong generations: id, created_at
|
And one more example (this ids use in messages table), messages sorted by "id", since in theory uuid v7 should be monotonically increasing Therefore, because of this bug, sometimes the wrong order of messages appears in correspondence id, created_at
|
|
Hello, I came across a strange case where the library generated uuid v7 incorrectly in time.
Here example of table
id = Uuid::uuid7()->toString()
andcreated_at (server datetime)
, sorted by id (asc)id, created_at
018d7fca-3ae5-7306-a040-204628e43dc9, 2024-02-06T18:59:36.000000Z
018d7fdc-0ba8-7006-8047-41a572a695c6, 2024-02-06T19:19:03.000000Z
018d8030-0dab-7206-a042-31238ed9cb48, 2024-02-06T20:50:49.000000Z
018d8041-7c1b-7106-8043-6c5e69c8fbbd, 2024-02-06T21:09:51.000000Z
01a6ce4c-5a19-7006-b045-197ad8210718, 2024-02-06T19:19:54.000000Z
For some reason,
ID=01a6ce4c-5a19-7006-b045-197ad8210718
was generated incorrectlyThe text was updated successfully, but these errors were encountered: