Hi,
I'm encountering issues with mongoengine queries when executed from several frontends.
As you can see, on a single machine, the query works as expected.
But, as you evolve on multiple nodes, dict key orders may vary. so that the pymongo request will sometimes be:
{'_types': 'Resource', 'acl.read_list': {'$in': [{'_ref': DBRef('user', ObjectId('51961d7d4ab63c143f1c7a81')), '_cls': 'User'}, {'_ref': DBRef('group', ObjectId('51961d7d4ab63c143f1c7a82')), '_cls': 'Group'}]}}
and sometimes:
{'_types': 'Resource', 'acl.read_list': {'$in': [{'_cls': 'User', '_ref': DBRef('user', ObjectId('51961d7d4ab63c143f1c7a81'))}, {'_cls': 'Group', '_ref': DBRef('group', ObjectId('51961d7d4ab63c143f1c7a82'))}]}}
This is because dict does not preserves order (and varies from one machine/VM to another) and because MongoDB seems to handle the whole data, and not key/values one by one...
Did anyone of you have experienced this kind of issue?
Thanks!