-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.3.2
-
Component/s: None
-
None
Growing an object size through the use of $push doesn't trigger the 4MB object limit error.
JS shell session that creates an object of 5MB, by $push ing 1MB strings onto an array:
> s = "x"
> for(i = 0; i < 20; i++) s += s
> s.length // 1MB string
1048576
> db.test.remove()
> db.test.insert(
)
ObjectId("4b83590a8f668d84b215eaa5")
> for(i = 0; i < 5; i++) db.test.update({}, {$push: {a:s}}) // push 5 times = ~5 MB object size
> db.test.findOne().a.length
5
> db.getLastError()
null