Mongodb update with upsert fails

可紊 提交于 2020-01-06 04:57:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!