meteor-feature-requests icon indicating copy to clipboard operation
meteor-feature-requests copied to clipboard

Support mutate-and-return operations

Open Torgen opened this issue 4 years ago • 0 comments

The current MongoDB driver supports the operations findOneAndDelete, findOneAndReplace, and findOneAndUpdate which support modifying a document and returning the old version of the document as a single operation. Especially since Meteor doesn't allow creating a transaction yet, supporting these atomic operations would allow developers to avoid patterns like double checked read and update loops to avoid race conditions.

Torgen avatar Dec 18 '20 08:12 Torgen