UUID and Java :)

Author: Szymon Lipiński
Published at: 2011-01-19

Well, UUID stands for something UNIQUE. How that happend that it simply doesn’t work? Or even worse: it doesn’t work sometimes.

I had to use a program which generates some random data in the database. The primary key is UUID, so the program generates a lot of UUIDs. It uses the standard Java’s way of generating UUIDs, the function: UUID.randomUUID().

That program failed twice, it was a database error. The error was that the UUID exists in the database. I’ve created only a litttle bit over 50k of database rows. There were two collisions.

I told that the author of the software, he said that he had the same situation last week.

We still don’t know what was going on.

The comments are disabled. If you want to write something to me, you can use e.g. Twitter.