On 11/12/25 4:06 AM, 'Emiliano Heyns' via zotero-dev wrote:
> Is there even a 100% guarantee that object keys are unique even in the
> present? Theoretically, two clients synced to the same group can
> generate the same key, right? Very low probability I take it, but not
> impossible.
If the objects are synced, they're unique by definition, since there
can't be more than one object in an online library with a given key.
Personal vs. group doesn't make a difference.
When creating an item locally, we don't currently test whether a key
exists in the local database before trying to create the object. If it
does, the write will just fail and work again on the next attempt. (We
haven't done the math in a while, but we don't have any reason to think
this actually happens, or has happened more than a few times in Zotero's
existence.)
So if client A creates 'AAAAAAAA' and uploads it, any other client that
syncs that change (or client A itself) would just hit the above error if
it then tried to create an object with the same key.
If client A and client B both create 'AAAAAAAA' at the exact same time,
or while offline, 1) they're extraordinarily unlucky and 2) one of them
would get a conflict resolution window or some other weird error. This
wouldn't be great, but the odds of this happening are very, very low.