Ask HN: We just had an actual UUID v4 collision...

·Hacker News··

I know what you're thinking... and I still can't believe it, but...This morning, our database flagged a duplicate UUID (v4). I checked, thinking it may have been a double-insert bug or something, but no.The original UUID was from a record added in 2025 (about a year ago), and today the system inserted a new document with a fresh UUIDv4 and it came up with the exact same one:b6133fd6-70fe-4fe3-bed6-8ca8fc9386cdWe're using this: https://www.npmjs.com/package/uuidI thought this is technically impossible, and it will never happen, and since we're not modifying the UUIDs in any way, I really wonder how that.... is possible!? We're literally only calling:import { v4 as uuidv4 } from "uuid";const document_id = uuidv4();... and then insert into the database, that's it.Additionally, the database only has about 15.000 records, and now one collision. Statistically... impossible.Has that ever happened to anyone?! What in the...

Read full article →

Related Articles

“Beyond the limit”: Satellites and mirrors in space pose threat to the night sky
Breadmaker · Hacker News · 1d ago
Solar rail could become common in Europe after successful trial in Switzerland
neilfrndes · Hacker News · 2h ago
GPT-5.5 Codex reasoning-token clustering may be leading to degraded performance
maille · Hacker News · 19h ago
Potential session/cache leakage between workspace instances or consumer accounts
chatmasta · Hacker News · 1d ago
Show HN: KiCad in the Browser
ViktorEE · Hacker News · 5h ago