[SERVER-11415] aggregate helper fails against old server versions (unrecognized field "cursor" Created: 28/Oct/13  Updated: 10/Mar/14  Resolved: 13/Nov/13

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Shell
Affects Version/s: 2.5.3
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Currently using the new shell aggregate helper fails with this error when running against an old server:

assert: command failed: { "ok" : 0, "errmsg" : "unrecognized field \"cursor" } : 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:921:12)
    at (shell):1:9
2013-10-28T07:42:44.090-0400 command failed: { "ok" : 0, "errmsg" : "unrecognized field \"cursor" } : aggregate with cursor failed at src/mongo/shell/assert.js:7

We should easily be able to have the helper work with old server versions, which don't return a cursor or accept that option.



 Comments   
Comment by auto [ 13/Nov/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-11415 Shell aggregate() helper now supports old servers
Branch: master
https://github.com/mongodb/mongo/commit/47499ce5427e190d76eea978f8e212d9b71f05b0

Generated at Thu Feb 08 03:25:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.