Closed zonotope closed 7 months ago
I woke up in a cold sweat haunted by the possibility of collisions in our blank node ids so I decided to make those far less likely.
This patch integrates nano-id to generate blank node ids instead of using rand-int like we did previously. It retains the timestamp prefix so we still won't have too much index thrashing. Using a nano-id length of 8, we'd need to generate 2 million ids in one millisecond to get a collision probability of 1%.
rand-int
user> (new-blank-node-id) "_:fdb-1708699899809-sfqiEdMv"
I woke up in a cold sweat haunted by the possibility of collisions in our blank node ids so I decided to make those far less likely.
This patch integrates nano-id to generate blank node ids instead of using
rand-int
like we did previously. It retains the timestamp prefix so we still won't have too much index thrashing. Using a nano-id length of 8, we'd need to generate 2 million ids in one millisecond to get a collision probability of 1%.