Comment 6 for bug 568095

Revision history for this message
Eric Day (eday) wrote :

Turns out uuid_generate_time() on this machine is producing duplicate UUIDs, which is really bad. I reproduced this behavior outside of drizzle as well with:

http://oddments.org/wiki/index.php?id=programming:c:uuid_dupes.c

So, in order to guarantee uniqueness we either need to come up with a new uuid function of our own or somehow serialize uuid_generate. A simple mutex may not work since CPU clocks may not always be in sync with each other. We would probably need to keep a small time history of recent UUIDs to provide a guarantee.