[SERVER-24891] aggregation pipeline new operators $ln, $log, $exp not in 3.2.7?? Created: 04/Jul/16  Updated: 14/Jul/16  Resolved: 05/Jul/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 3.2.7
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Bill Chute Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS X 10.11.5 encountered in mgo (golang) driver, confirmed in Mongo command shell


Participants:

 Description   

SERVER-18427 added $ln, $log, etc. as arithmetic operators in aggregation pipeline

Now running latest stable 3.2.7

Using new operator in aggregation pipeline throws "invalid operator".
Similar for $exp, $log,
Older operators like "$add", "$multiply" are fine.

Has this regressed?

> version()
3.2.7
> db.filings.aggregate( [ {$match: {"cert":90303}},{$project:{ x: { $ln: "$asset" } } } ] )
assert: command failed: { "errmsg" : "exception: invalid operator '$ln'", "code" : 15999, "ok" : 0 } : aggregate failed
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:13:14
assert.commandWorked@src/mongo/shell/assert.js:267:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1312:5
@(shell):1:1
 
2016-07-04T19:05:30.173+0100 E QUERY    [thread1] Error: command failed: { "errmsg" : "exception: invalid operator '$ln'", "code" : 15999, "ok" : 0 } : aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:13:14
assert.commandWorked@src/mongo/shell/assert.js:267:5
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1312:5
@(shell):1:1



 Comments   
Comment by Ramon Fernandez Marina [ 05/Jul/16 ]

Glad yo hear things are working for you bill.chute@acadiant.com. In the future, please note that questions like this one are best posted on the mongodb-user group or Stack Overflow with the mongodb tag, where they will reach a larger audience.

Closing this ticket on your behalf.

Regards,
Ramón.

Comment by Bill Chute [ 05/Jul/16 ]

Done!

Stephen, thank you so very much indeed for your quick response and advice.

db.serverBuildInfo() revealed this development server was running a pre-3.2 version of mongodb, installed via MMS before Mongo cut off access to the free-of-charge development MMS and had therefore fallen off the radar for maintenance. I manually installed 3.2.7 on the box and it works! Now to move all remaining MapReduce complex math into Aggregation Framework.

I'll now make sure all of my developers learn, as I did, the difference between "version" and "db.serverBuildInfo()".

I sincerely appreciate the quick guidance. It appears I cannot close this item; I would if I could; of course you may.

Bill.

Comment by Stennie Steneker (Inactive) [ 05/Jul/16 ]

Hi Bill,

Can you confirm the MongoDB server version you are connecting to with db.version()? The version() command only reports the client-side mongo shell version; aggregation is a server side operation.

If you are definitely connecting to a 3.2.7 server, please provide the output of db.serverBuildInfo() and confirm how you installed MongoDB.

Thanks,
Stephen

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