> db.noindex.aggregate({$sample:{size:2}})
|
{ "_id" : ObjectId("558479e1acb64a95da32c877"), "a" : 182 }
|
{ "_id" : ObjectId("558479b5acb64a95da32c3d9") }
|
> db.noindex.aggregate({$sample:{size:2}})
|
{ "_id" : ObjectId("558479b5acb64a95da32c3d9") }
|
{ "_id" : ObjectId("558479e1acb64a95da32c877"), "a" : 182 }
|
> db.noindex.aggregate({$sample:{size:2}})
|
{ "_id" : ObjectId("558479b5acb64a95da32c3d9") }
|
{ "_id" : ObjectId("558479e1acb64a95da32c877"), "a" : 182 }
|
db.noindex.aggregate({$sample:{size:3}})
|
assert: command failed: {
|
"ok" : 0,
|
"errmsg" : "$sample stage could not find a non-duplicate document after 100 while using a random cursor. This is likely a sporadic failure, please try again.",
|
"code" : 28799
|
} : aggregate failed
|
_getErrorWithCode@src/mongo/shell/utils.js:23:13
|
doassert@src/mongo/shell/assert.js:13:14
|
assert.commandWorked@src/mongo/shell/assert.js:259:5
|
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1211:5
|
@(shell):1:1
|
|
2015-09-18T15:48:35.893-0400 E QUERY [thread1] Error: command failed: {
|
"ok" : 0,
|
"errmsg" : "$sample stage could not find a non-duplicate document after 100 while using a random cursor. This is likely a sporadic failure, please try again.",
|
"code" : 28799
|
} : aggregate failed :
|
_getErrorWithCode@src/mongo/shell/utils.js:23:13
|
doassert@src/mongo/shell/assert.js:13:14
|
assert.commandWorked@src/mongo/shell/assert.js:259:5
|
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1211:5
|
@(shell):1:1
|