-
Type:
Bug
-
Resolution: Done
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Query
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The 2.7 nightly has a change (regression?) from 2.6 running parallelCollectionScan on an empty collection. In 2.6, it still returned a cursor. Somewhere in 2.7, it changed to returning no cursors at all. This may break drivers that expect at least one cursor to be returned.
Under 2.6:
> use test
switched to db test
> db.test_coll.insert({})
WriteResult({ "nInserted" : 1 })
> db.test_coll.remove({})
WriteResult({ "nRemoved" : 1 })
> db.test_coll.find({})
> db.runCommand({parallelCollectionScan:"test_coll", numCursors:3})
{
"cursors" : [
{
"cursor" : {
"firstBatch" : [ ],
"ns" : "test.test_coll",
"id" : NumberLong("64941895831323")
},
"ok" : true
}
],
"ok" : 1
}
Under 2.7 (4f01ffd9cbbb0dcb4ee2f9167ad2337178259ba9-2014-07-23):
> use test
switched to db test
> db.runCommand(
Display all 182 possibilities? (y or n)
> db.test_coll.insert({})
WriteResult({ "nInserted" : 1 })
> db.test_coll.remove({})
WriteResult({ "nRemoved" : 1 })
> db.test_coll.find({})
> db.runCommand({parallelCollectionScan:"test_coll", numCursors:3})
{ "cursors" : [ ], "ok" : 1 }