Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ACID support #177

Closed
ninedraft opened this issue May 28, 2018 · 3 comments
Closed

Add ACID support #177

ninedraft opened this issue May 28, 2018 · 3 comments

Comments

@ninedraft
Copy link

Multi doc ACID transactions are part of mongo now!
Please, add at least basic support. If any help is a need, I'm ready for the assistance.

@domodwyer
Copy link

domodwyer commented May 30, 2018

Hi @ninedraft

This involves a lot of work before transaction support can be added. Assuming the OP_MSG wire protocol introduced in 3.6 is required, a minimum of:

The actual driver specification for transactions hasn't been published yet.

@feliixx (thanks!) did a fantastic job and all the really tricky bits are already done, but there's still a lot left! While 4.0 support isn't a priority for us internally, we are always open to PRs and will happily maintain and test the driver additions for stability, etc.

Dom

@duskglow
Copy link

duskglow commented Sep 19, 2018

Hi,

I've added some rudimentary 4.0-style transaction support. I'll be sending a pull request shortly. I don't pretend it won't need a little more work, but the actual base support was pretty easy. I didn't use the "txn" library, I just bolted it right into the main code, but in a backward-compatible fashion.

I don't have tests or anything like that, though. Should I just send the PR and see what happens?

@duskglow
Copy link

You can see a preview of what we've done at https://github.com/homedepot/mgo . There's also some basic documentation on how to use it. We need to add tests and other things so it'll be a bit before I can do a pull request, but please feel free to take a look over the changes and provide feedback if you're so inclined.

The long and short is: we created a new transaction object, and added transaction support in the session object. So now you just create a transaction object based on the session and use that for the transactions. There's some cleanup and a few changes that we need to make before it's "ready for prime time", but you can get the gist from that. Please let us know if you have feedback, we can devote a little time to addressing concerns to make it ready for the wider community.

If you want to do a "glide get" on our repo, feel free, but it's a moving target right now, so I don't promise it will be stable for the short term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants