balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.83k stars 1.95k forks source link

support Transactions in mongo db #4620

Open Sandeeprao69 opened 6 years ago

Sandeeprao69 commented 6 years ago

Waterline version: Node version:9.11 NPM version:5 Operating system:Ubuntu 16.04


How can i support mongo db 4 transaction in sails waterline. i did not find any documentation for this.

sailsbot commented 6 years ago

Hi @Sandeeprao69! It looks like you may have removed some required elements from the initial comment template, without which I can't verify that this post meets our contribution guidelines. To re-open this issue, please copy the template from here, paste it at the beginning of your initial comment, and follow the instructions in the text. Then post a new comment (e.g. "ok, fixed!") so that I know to go back and check.

Sorry to be a hassle, but following these instructions ensures that we can help you in the best way possible and keep the Sails project running smoothly.

*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact inquiries@sailsjs.com

streleck commented 6 years ago

@Sandeeprao69 Are there specific methods of Mongo 4 that you are looking for, or is it not working all together?

Sandeeprao69 commented 6 years ago

Hi @streleck I am looking for mongo db ACID Transaction which is introduced in version4. link

streleck commented 6 years ago

@Sandeeprao69 As in writing to multiple tables in a single transaction?

sandeeprao691 commented 6 years ago

@streleck yup. That's what I want to achieve. I am using sails 1.0

mikermcneil commented 6 years ago

I can review a PR that adds this to sails-mongo, as long as it uses the same approach that we use in the relational adapters

mikermcneil commented 6 years ago

cc @luislobo

luislobo commented 6 years ago

@mikermcneil @sandeeprao691 To support transactions, sails-mongo needs to be upgraded to at least 3.1.0 (https://docs.mongodb.com/manual/core/transactions/#transactions-and-mongodb-drivers). It would incur some changes internally (as sails-mongo right now uses "mongodb": "2.2.25")

It will include some probably incompatibility configuration changes (that could be handled by printing messages about it, auto migrating the configuration for the user).

During the update, https://github.com/mongodb/node-mongodb-native/blob/master/CHANGES_3.0.0.md should be checked to make sure that everything still works. and that we can start supporting sessions, transactions, etc.

I could start a new version supporting all of this. @mikermcneil as usual I might need your help/support on some topics.

mikermcneil commented 6 years ago

@luislobo You bet- feel free to loop me in early on to talk through it. Would be good for me to get caught up anyway

nagarjun commented 6 years ago

@luislobo @mikermcneil Any idea when this might be released?

Sandeeprao69 commented 5 years ago

@luislobo @mikermcneil Guys, can you please tell me when this might be released. If not soon can you guys please suggest a way to achieve transactions in mongo db using waterline.

sandeeppc commented 5 years ago

@mikermcneil @luislobo Any updates on proposed support or workaround?

harshreddy commented 4 years ago

@mikermcneil @luislobo Any updates for ACID transactions support on sails-mongo ?

thewildsnorlax commented 3 years ago

Hi @mikermcneil @luislobo @streleck @Sandeeprao69

Are there any updates on tentative release of transaction support in sails-mongo?

Thanks

eashaw commented 3 years ago

Hi @thewildsnorlax, there are no updates on this right now.