[DOCS-3028] Make note in the 2.6 compatibility about change of agg helper in the shell returns cursor Created: 28/Mar/14  Updated: 02/Apr/14  Resolved: 02/Apr/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.3

Type: Task Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: sprint-slipstream
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 9 years, 46 weeks ago

 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");} );



 Comments   
Comment by Githook User [ 02/Apr/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-3028 DOCS-3027 agg and j:1 incompatibility
Branch: master
https://github.com/mongodb/docs/commit/d788b2907484f2eed460c799b329215438eb0c72

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