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