I'm sometimes hitting "duplicate key error index" when calling get_or_create. I believe this is cause by a race condition. It first tries to "get" the object, that fails so it tries to create it.
Has anyone experienced this and is there a standard solution for it?
File "/u/python/chaturbate/mongoengine/queryset.py", line 832, in get_or_create
doc.save(write_options=write_options)
File "/u/python/chaturbate/mongoengine/document.py", line 236, in save
raise OperationError(message % unicode(err))
OperationError: Tried to save duplicate unique keys (E11000 duplicate key error index: mydb.ban_info.$uid_1 dup key: { : 2480401 })