Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11415

aggregate helper fails against old server versions (unrecognized field "cursor"

    • Fully Compatible
    • ALL

      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.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: