I’m suddenly seeing errors which I can so far only explain by the datastore creating entities with the same ID/key. This seems (and I’m hoping like crazy) that this is associated with a just one entity group.
It started happening about 90 mins ago, when we were getting more hits/second (12) than I’ve ever seen, so there is a good chance that this is related to a second instance spinning up – the dashboard doesn’t show a second instance, though.
Anyone else seeing anything weird? If so, please let me know to save me trying to figure out how my code could be failing with multiple instances.
My problem ended up being due to a user who posted a link which included a session ID. Other users who clicked that link got the same session, and so all of them used the same entity referenced by the ID in that session. I’m adding logic so if the referrer is not my site, the presented session ID is ignored.
So the answer is that I WASN’T getting duplicate IDs from the datastore. If anyone else thinks this is causing their bug in the future, you’re probably wrong (although make sure you understand the comments about different entity types and parenting).