Open
Description
Specification
If the seq bitspace gets exhausted either within the 1 millisecond interval, or waiting for the OS clock to catch up to the last ID, the IdSortable
should throw an exception. Any further generated IDs would no longer be valid, and therefore would violate the monotonic constraint of IdSortable
.
Additional Context
- UUIDv7 with Millisecond Precision and Clock Sequence Rollovers uuid6/uuid6-ietf-draft#40
- v7: Change "clock sequence" to "counter" uuid6/uuid6-ietf-draft#51
Tasks
- Check if the
seq
bitspace is exhausted when generating an id - Throw an exception like
ErrorIdSortableSequenceRollover
orErrorIdSortableCounterExhausted
... - Tests for if one generates too many ids while mocking a static time.
- Tests for if the last ID is too far in the past.