[SERVER-375] $mul for update Created: 20/Oct/09  Updated: 28/Oct/15  Resolved: 05/Sep/13

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 2.5.2

Type: New Feature Priority: Minor - P4
Reporter: Mathias Stearn Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongodb-multiply-git.patch     Text File mongodb-multiply.patch    
Issue Links:
Depends
depends on SERVER-6399 Refactor update() code Closed
Related
Participants:

 Description   

This is useful for age out applications.

When tagged:
db.tags.update({_id:foo}, {$inc:1})

Hourly:
db.tags.update({}, {$multiply:0.99})



 Comments   
Comment by Andrew Morrow (Inactive) [ 20/Sep/13 ]

Filed a new ticket for the fix for the behavior against a missing element: SERVER-10832

Comment by Eliot Horowitz (Inactive) [ 05/Sep/13 ]

It is not going to be renamed, it will be $mul as per discussions.

Comment by Scott Hernandez (Inactive) [ 04/Sep/13 ]

We should rename this to $multiply to be consistent with aggregation.

Comment by auto [ 20/Aug/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-375 Implement $mul by way of $inc
Branch: master
https://github.com/mongodb/mongo/commit/c735600b22a78b8736c89568332a321a6753e924

Comment by auto [ 20/Aug/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-10490 SERVER-375 Add static assertions for overflow safe algos
Branch: master
https://github.com/mongodb/mongo/commit/4a6f0941c13ac6a197bb787e238ddbc12120b641

Comment by auto [ 20/Aug/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-375 Implement multiplication for SafeNum
Branch: master
https://github.com/mongodb/mongo/commit/95f78edec079e130c58bed831cfe341f45250784

Comment by Will Shaver [ 17/May/13 ]

2011? Why isn't this in core?

Comment by Diego Giagio [ 06/Feb/11 ]

Attached follows a patch to add $multiply support to both 1.6.5 (mongodb-multiply.patch) and git (mongodb-multiply-git.patch) versions.

Generated at Thu Feb 08 02:53:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.