-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.6.0-rc0
-
Component/s: Aggregation Framework
-
Query Optimization
-
ALL
I'm puzzled for a couple of reasons:
1) NaN is not a negative numbers so the error message should be at least different.
2) Other operations handle NaN differently, e.g. find().limit(Nan) is equivalent to find().limit().
> use foo switched to db foo > var bigArray = []; > for (var i = 0; i < 1000; ++i) { bigArray.push(i); } 1000 > var bigStr = Array(1001).toString(); > for (var i = 0; i < 100; ++i) { db.goo.insert({_id: i, bigArray: bigArray, bigStr: bigStr})}; WriteResult({ "nInserted" : 1 }) > var cursor = db.runCommand({aggregate: "goo", pipeline: [{$unwind:'$bigArray'}], cursor : {batchSize: NaN}}) > cursor { "errmsg" : "exception: Cursor batchSize must not be negative", "code" : 16957, "ok" : 0 }
- related to
-
SERVER-12813 Overflow when converting double values in user input to long long values
- Open