RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v10]
Daniel Fuchs
dfuchs at openjdk.org
Tue Jul 1 15:23:41 UTC 2025
On Tue, 1 Jul 2025 15:20:07 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> The uniqueness comes not just from the timestamp but also from the random data in the other bytes that are generated for each new UUID.
>
> Hello Roger, that's true about the uniqueness semantics. However, from what I understand of RFC-9562, on which this new API is based, it has much stricter expectations about monotonocity (the first 48 bits) too. For example, the following sections:
>
> https://www.rfc-editor.org/rfc/rfc9562.html#name-timestamp-considerations
> https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters
This method ensures monotonicity, at the cost of potentially returning a time stamp in the future if the system clock has been moved back by NTP. Not sure if that's an issue or not - but it's certainly a tradeoff.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25303#discussion_r2177889997
More information about the core-libs-dev
mailing list