[SERVER-6615] Missing Aggregration Framework after upgrade from 2.0.4 --> 2.2.0 RC0 Created: 26/Jul/12  Updated: 11/Jul/16  Resolved: 28/Aug/12

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 2.2.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jason Chuong Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

EL5x64


Operating System: ALL
Participants:

 Description   

Hi,

When I upgrade from 2.0.4 --> 2.2.0 rc0 using the upgrade instruction via . http://docs.mongodb.org/manual/release-notes/2.2/#upgrading

I notice that the aggregate function isn't working but when I startup the port and point to a new path, it does.

PRIMARY> db.serverStatus()
{
"host" : "db1",
"version" : "2.2.0-rc0",
"process" : "mongod",

PRIMARY> db.c1.aggregate({$sort : { assetId : -1 , status : -1 }});
Thu Jul 26 14:51:45 TypeError: db.Content.aggregate is not a function (shell):1



 Comments   
Comment by Jason Chuong [ 28/Aug/12 ]

Hi Mathias,

I upgraded to 2.2.0 rc1 last week and that seems to fix the problem. thanks

Comment by Mathias Stearn [ 28/Aug/12 ]

Please retry with a shell and a mongod from the latest rc. Before running an aggregation, please run version() and db.version() from the same shell. If you still have an issue, please include the output of those two functions.

Comment by Jason Chuong [ 31/Jul/12 ]

Hi Ian,

I followed the instruction via http://docs.mongodb.org/manual/release-notes/2.2/#upgrading

Upgrade the secondary members of the set one at a time by shutting down the mongod and replacing the binary with the 2.2 binary.
Use the rs.stepDown() to step down the primary to allow normal failover procedure.
rs.stepDown() and replSetStepDown provide for shorter and more consistent failover procedures than simply shutting down the primary directly.

When the primary has stepped down, shut the instance down and upgrade by replacing the mongod binary with the 2.2 binary.

Comment by Ian Whalen (Inactive) [ 31/Jul/12 ]

@jason, just following up to see if you could provide the repeatable steps for getting this to fail?

Comment by Daniel Pasette (Inactive) [ 27/Jul/12 ]

It makes sense that aggregate works using the steps you detail above.
Can you explain/show what steps (and which versions are being used) you take such that aggregate does not work?

Comment by Jason Chuong [ 27/Jul/12 ]

Yes, from my last comment

When I restart the port and point to a brand new data path .ie ./bin/mongod --dbpath=/var/tmp/data, then aggregrate function works.

This is how I login to the mongo console ( note the shell version # )
./bin/mongo
MongoDB shell version: 2.2.0-rc0
connecting to: 127.0.0.1:9000/test

Comment by Daniel Pasette (Inactive) [ 27/Jul/12 ]

The error you are getting happens when you are using a 2.0 version of the shell because the function is not defined.

Are you still having issues? I don't know what you mean by "when i point to a new dbpath"

Comment by Jason Chuong [ 26/Jul/12 ]

Yes I am via

Note: the function works when i point to a new dbpath.

./bin/mongo --version
MongoDB shell version: 2.2.0-rc0

Comment by Eliot Horowitz (Inactive) [ 26/Jul/12 ]

That is a shell helper.
Are you using the shell from 2.2.0-rc0?

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