Here is the statement which fails:
db.some_collection.update(query,modifier_set, upsert=True, safe=True)
modifier_set is of the form {"$inc":{...}, "$addToSet":{...}}
I get an OperationFailure
error:
$ operator made object too large
Now, it's highly unlikely that my document it more that 16MB.
Any other possible reasons for such failure ?
It is actually a case of oversized document.
db.collection_name.stats()
confirmed it.