Closed noahfpf closed 3 months ago
Nice catch!
A part of me wonders if we really need a check for collisions on a v4 UUID from a battle tested lib like SecureRandom, especially on any well-behaved random source from a Linux/Unix host, though. The probability of such an event is so small that I would be very interested if it ever did happen.
It does have the 'but why not check?' kind of feel though, so maybe a setting to turn the collision check off in the config would be helpful for some users? Given a few centuries, or a very interesting coincidence, who knows what could happen.
@natemontgomery yeah the check is probably not needed like you correctly pointed out, but it's just an EXISTS command - so rather harmless
Indeed, it seems entirely fair to be paranoid about collisions, especially for so cheap a price.
Previously, the wrong key prefix was used, which means that this method was not actually checking whether a workflow id was already in use.