On Wed, Feb 13, 2013 at 8:08 PM, Matthew Dawson <[email protected]>wrote:
> As it has been explained to me, the chances of generating duplicate UUIDs > is > so small as to not exist (even taking into account such things as the > Birthday > Paradox). I don't think worrying about it is worth it. > Then maybe I should just remove the check? It'll be a lot simpler. > That being said, the increasing number thing is useful too. Three issues I > quickly forsee: > 1) Is this a hot path? Since only one id can generated at a time, it needs > proper locking. > QAtomicInt > 2) It is critically important that you store the integer before the new > resource, since otherwise you may end up with a duplicate in case of system > failures. And checking for a duplicate's existance brings you back to > square > one. > I'm not sure what you mean by store the integer. > 3) What happens when the number wraps around (if that is possible)? > That's not exactly possible. -- Vishesh Handa
_______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
