-
Notifications
You must be signed in to change notification settings - Fork 11
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
Mongo Server Side Transaction handles #6
Commits on Feb 27, 2019
-
Use the globalsign testing harness.
This should allow supporting more versions of Mongo than the existing mgo driver.
Configuration menu - View commit details
-
Copy full SHA for a71e200 - Browse repository at this point
Copy the full SHA a71e200View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f9c39e - Browse repository at this point
Copy the full SHA 9f9c39eView commit details -
More tests that fail with Mongo 4.0.
Copying over the filterDBs changes and EnsureIndex fixes from globalsign/mgo.
Configuration menu - View commit details
-
Copy full SHA for 2ba6a22 - Browse repository at this point
Copy the full SHA 2ba6a22View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4f6294 - Browse repository at this point
Copy the full SHA d4f6294View commit details -
Update Session to support tracking transactions.
Currently Abort is not supported, and it only supports Insert operations, but the basic layout is plausible and seems like it will work.
Configuration menu - View commit details
-
Copy full SHA for a4146d4 - Browse repository at this point
Copy the full SHA a4146d4View commit details
Commits on Feb 28, 2019
-
Interestingly, you can't see the documents that you've inserted in the session that inserted them...
Configuration menu - View commit details
-
Copy full SHA for e763a98 - Browse repository at this point
Copy the full SHA e763a98View commit details -
Start trying to implement query side of transactions.
Need to pass in lsid and txnNumber to enable visibility of queries for things that you just created.
Configuration menu - View commit details
-
Copy full SHA for 2232dc5 - Browse repository at this point
Copy the full SHA 2232dc5View commit details -
Implement support for Find and Update.
Looks like we finally found the right attributes for where to put lsid and txnNumber. We now see the right visibility for updates and insertions. Still need to do Upsert/UpdateAll, etc.
Configuration menu - View commit details
-
Copy full SHA for 79b643f - Browse repository at this point
Copy the full SHA 79b643fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 482a2df - Browse repository at this point
Copy the full SHA 482a2dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 73f9a11 - Browse repository at this point
Copy the full SHA 73f9a11View commit details -
Change away from annotating Ops.
Instead, all the places that were putting a transaction on the op before submitting it, just use the code path that submits the request to deal with the transaction.
Configuration menu - View commit details
-
Copy full SHA for a15af30 - Browse repository at this point
Copy the full SHA a15af30View commit details
Commits on Mar 7, 2019
-
Also handle if a Session is Closed with an active transaction. Rework a lot of the Commit/Abort code paths, and make use of the Session.m object to properly handle Start/Abort/Commit. Needs tests around Insert/Update/Upsert/Remove/Find and Start/Commit/Abort sequencing.
Configuration menu - View commit details
-
Copy full SHA for 7cd52d4 - Browse repository at this point
Copy the full SHA 7cd52d4View commit details -
(broken) attempt at synchronizing Find/Remove/Insert.
These don't actually work because while there may not be a *data* race in memory, they race eachother for things like 'who is the first to start the transaction'. They also potentially race around 'is the transaction finished'. This might be good enough, as we don't really want to try to make it possible to do things multithreaded, we just don't want the memory structures to get corrupted. One caveat is that the TXN isn't actually started until the first operation, so it may be that we want to support an outer routine calling StartTransaction, but it forks off a bunch of helper routines that are all issued inside the transaction. If we want that, then the best thing is to probably put a Mutex on the 'transaction' object itself. And then we need to hold the mutex while the query is being performed, so that we know we really have issued 'startTransaction' on the remote side.
Configuration menu - View commit details
-
Copy full SHA for acae056 - Browse repository at this point
Copy the full SHA acae056View commit details
Commits on Mar 10, 2019
-
Cleanup multithreading support.
Clone doesn't copy the session or transaction, that way we don't have to worry about txn updates, but also we certainly think that Copy() should have its own transaction identity. And it makes sense that Clone should too. Especially we don't want Copy during a txn to behave differently than Copy outside of a transaction. Get rid of txn.finished. Let the server decide if the transaction is active.
Configuration menu - View commit details
-
Copy full SHA for 481d1d5 - Browse repository at this point
Copy the full SHA 481d1d5View commit details