MongoDB shell version: 2.5.3
|
connecting to: test
|
Server has startup warnings:
|
2013-11-03T19:16:05.526-0500 [initandlisten]
|
2013-11-03T19:16:05.526-0500 [initandlisten] ** NOTE: This is a development version (2.5.3) of MongoDB.
|
2013-11-03T19:16:05.526-0500 [initandlisten] ** Not recommended for production.
|
2013-11-03T19:16:05.526-0500 [initandlisten]
|
// As big a document as we can make.
|
> var bytes=(16 * 1024 * 1024) - (4 + 6 + 5);
|
// ... using one large hex string.
|
> var hex=""
|
> for ( var i = 0; i < bytes; ++i ) { hex=hex+"00"; } ; db.test.insert( { "_id" : HexData( 0, hex ) } )
|
> db.test.find({}, { _id : 0 } )
|
{ }
|
> db.test.aggregate( { $match : {} } )
|
assert: command failed: {
|
"errmsg" : "exception: Tried to create string longer than 16MB",
|
"code" : 16493,
|
"ok" : 0
|
} : aggregate with cursor failed
|
Error: Printing Stack Trace
|
at printStackTrace (src/mongo/shell/utils.js:38:15)
|
at doassert (src/mongo/shell/assert.js:6:5)
|
at Function.assert.commandWorked (src/mongo/shell/assert.js:238:5)
|
at DBCollection.aggregate (src/mongo/shell/collection.js:907:12)
|
at (shell):1:9
|
2013-11-03T19:23:27.549-0500 command failed: {
|
"errmsg" : "exception: Tried to create string longer than 16MB",
|
"code" : 16493,
|
"ok" : 0
|
} : aggregate with cursor failed at src/mongo/shell/assert.js:7
|
|
// Verify we can read the document without printing it out...
|
> Object.bsonsize( db.test.findOne({}) )
|
16777216
|