Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3028

Make note in the 2.6 compatibility about change of agg helper in the shell returns cursor

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.3
    • Component/s: manual
    • Last comment by Customer:
      true
    • Actual Time:
      4

      Description

      This change can take users by surprise when their scripts suddenly stop working when they upgrade.

      For example, this command in the shell would need to remove the result after the command.

      2.4:

      db.chunks.aggregate( 
      { $group : { _id : { "ns" : "$ns" , "shard" : "$shard" }, total  : { $sum : 1 } } }, 
      { $sort : { "_id.ns" : 1, "_id.shard" : 1 } } ).result.forEach( function(x) {print("foo");} );

      Change to this in 2.6:

      db.chunks.aggregate( 
      { $group : { _id : { "ns" : "$ns" , "shard" : "$shard" }, total  : { $sum : 1 } } }, 
      { $sort : { "_id.ns" : 1, "_id.shard" : 1 } } ).forEach( function(x) {print("foo");} );

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            pasette Daniel Pasette
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              7 years, 30 weeks, 2 days ago
              Date of 1st Reply: