Steps to reproduce:
1. Set up a sharded system with at least two shards (in my case they are both replica sets with a primary and two secondaries)
2. Enable sharding on a database
3. Shard a collection in that database.
4. Insert enough data that chunks are migrated to both shards (this may not be required)
5. Run findAndModify querying for a document that does not exist using the shard key.
Expected results:
mongos returns 'No matching object found'
Actual result:
mongos returns
{u'ok': 1.0}This was found while investigating http://jira.mongodb.org/browse/PYTHON-219 so the problem also exists in at least 1.7.6.
- is depended on by
-
PYTHON-219 KeyError in find_and_modify
- Closed