Info
Here is the error string that an update with $pop returns if the field we try to pop from is not an array:
> db.x.drop()
true
> db.x.save({_id: NumberInt(3), a: 1})
> db.x.update({}, {$pop: {a: 1}})
Can only $pop from arrays. INVALID-MUTABLE-ELEMENT has the field a of non-array type NumberDouble
The problem is that INVALID-MUTABLE-ELEMENT is displayed instead of properly printing the _id of the document on which the update failed.
Top User Comments
xgen-internal-githook commented on Wed, 4 Dec 2013 17:33:21 +0000:
Author:
{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}
Message: SERVER-11188, SERVER-11366, SERVER-11384, SERVER-11623: Update message cleanup
Branch: master
https://github.com/mongodb/mongo/commit/a523a77c9601d3d8c1bd6175ead83702b95409b9