问题
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 ?
回答1:
It is actually a case of oversized document.db.collection_name.stats()
confirmed it.
来源:https://stackoverflow.com/questions/11224942/mongodb-update-with-upsert-fails