--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+unsubscribe@googlegroups.com.
UI to deal with key collisions in a set of 850 billion is so unlikely to ever be used that it's simply not worth writing. It'd amount to unreachable code and would therefore be undertested and would be better off not being written.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
So the only time when a key clash is possible is when two clients add an item with the same key before each is able to sync to the server. I understand that the odds of this are ridiculously low, but what if it does happen and the user is notified of the conflict. The items would, presumably, be completely different, so the current conflict resolution window would be of little help. Perhaps we should add an option to regenerate a new key for the local item. It could be an option for the local file that says "Treat as a separate item". This might also be useful in some cases where the items are actually the same, but perhaps a merge between the two would be more convenient.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
On 3/5/13 3:32 AM, Aurimas Vinckevicius wrote:
So the only time when a key clash is possible is when two clients add an item with the same key before each is able to sync to the server. I understand that the odds of this are ridiculously low, but what if it does happen and the user is notified of the conflict. The items would, presumably, be completely different, so the current conflict resolution window would be of little help. Perhaps we should add an option to regenerate a new key for the local item. It could be an option for the local file that says "Treat as a separate item". This might also be useful in some cases where the items are actually the same, but perhaps a merge between the two would be more convenient.
I'm pretty unconcerned with the key clash scenario. In the incredibly unlikely chance that it happened, the user could always cancel and duplicate the local item, and chalk it up to a bug (albeit a disconcerting one).
If we thought a "Keep Both" made sense generally, we could add that, but I don't know that it's worth it. (We can't add it to the current sync code, in any case, so this would have to wait for API syncing.)
Not sure if you were suggesting it as a new feature, but a merge between the two versions is already possible in the merge window.
On Tue, Mar 5, 2013 at 1:59 AM, Dan Stillman <dsti...@zotero.org> wrote:
On 3/5/13 2:32 AM, Rönkkö Mikko wrote:If the client has a local item with a given key, then either the server already has that item (in which case another one can't come in) or it's set to upload, which, since the data wouldn't match, would result in a conflict being presented to the user. That conflict would be erroneous, but the user would at least be alerted to the problem.
How does Zotero handle this? I would assume that you check the keys when receiving data from the server and recreate local keys if server returns a conflicting key? This would prevent the conflict happening, right?How does Zotero deal with key collisions? It is theoretically possible that a client generates a key that already exists on the server and tries to upload that. How does the server respond in that case?There'd be a version conflict, since the client would pass [object]Version: 0 but there'd be a version on the server already. I've clarified this a bit in the documentation, including indicating that clients shouldn't use If-Unmodified-Since-Version for multi-object requests if they don't know the full state of the server library for that object type.
But if my math is correct, given the current set of characters there are 850 billion possible permutations, so the odds of this happening in a given library are pretty low.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.