Hi Jeff and Michael,

Yes, I am looking for a way to ensure that multiple servers don't create 
the same URLInfo object at the same time.

As Michael said: If you use a transaction to retrieve the entity by key 
(the URL) and then create one if it doesn't exist, only one entity should 
be successfully created in the event of a collision. Therefore, *even if 
you create two different versions with different unique ids,* only one 
should survive.

My question is do we really need to care about the lost Id (as only one 
entity is going to survive) in the case of collision? And can we have code 
snippet for allocating and assigning id to the URLInfo in the transaction 
that guarantees that there shall be only one instance of a URL in the 
datastore and the Ids of all the URLs are unique and non empty?

Thanks for your patience.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/9LXWEKXdndQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to