Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh, I didn't realize v7 was newer than ULID, thanks.


Be careful if you're using python.

The python uuid standard library doesn't have V7 yet, and there is a package called uuid7 which is unmaintained, and not in compliance with the latest standard. That's using nanosecond time precision rather than millisecond, which means the leading bits are larger than they are meant to be.

If you use that unmaintained uuid7 package and later change to the correct implementation your uuid7 will go backwards, which is a breaking change considering that monotonicity is a key property of uuidv7.


I believe your concern, while valid, only affects systems which are currently adding records faster than 1 per nano-second on occasion.

Also while technically true - it could technically break monotonicity (records added in the same nanosecond could be out of order) they'll still be all "near the end of the file, likely in the same page" such that performance implications are negligible.

As a general rule I would avoid any program making any assumptions about a uuid. Programs should treat it as an opaque binary random value. Doing so avoids any future incompatibilities.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: