-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.5.3
-
Component/s: Aggregation Framework
-
ALL
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
> db.messages.aggregate([ ], { cursor: { foo: 1} }) assert: command failed: { "errmsg" : "exception: cursor object can't contain fields other than batchSize", "code" : 16955, "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:13 2013-10-16T13:46:07.155-0700 command failed: { "errmsg" : "exception: cursor object can't contain fields other than batchSize", "code" : 16955, "ok" : 0 } : aggregate with cursor failed at src/mongo/shell/assert.js:7
This means that when we add new cursor option in later releases it'll be very annoying for drivers to handle and they'd need to wash the options first.
We've shot ourself in the foot before by doing this sort of validation which prohibits future improvements.