2012-03-09 13:53:59 -05:00
|
|
|
|
2016-02-04 12:29:01 -05:00
|
|
|
t = db.push2;
|
|
|
|
|
t.drop();
|
2010-01-13 14:57:44 -05:00
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
t.save({_id: 1, a: []});
|
2010-01-13 14:57:44 -05:00
|
|
|
|
2012-03-10 13:54:02 -05:00
|
|
|
s = new Array(700000).toString();
|
2010-01-13 14:57:44 -05:00
|
|
|
|
|
|
|
|
gotError = null;
|
|
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
for (x = 0; x < 100; x++) {
|
|
|
|
|
print(x + " pushes");
|
|
|
|
|
var res = t.update({}, {$push: {a: s}});
|
2014-03-14 15:21:49 -04:00
|
|
|
gotError = res.hasWriteError();
|
2016-03-09 12:17:50 -05:00
|
|
|
if (gotError)
|
2010-01-13 14:57:44 -05:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
assert(gotError, "should have gotten error");
|
2011-01-20 02:00:22 -05:00
|
|
|
|
|
|
|
|
t.drop();
|