summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/apply_ops.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-05-01 15:09:02 -0400
committerMathias Stearn <mathias@10gen.com>2014-05-14 13:58:01 -0400
commit6378da06b637dbf86f916274c8f0457d925af6a9 (patch)
treeb07693c3b786ad9eef3e17fe1a6a670f9229cd44 /src/mongo/db/commands/apply_ops.cpp
parent304534f11a265d8c18d788623185340c001cc26e (diff)
downloadmongo-6378da06b637dbf86f916274c8f0457d925af6a9.tar.gz
SERVER-13641 Pull TransactionExperiment up to top level request processor
Diffstat (limited to 'src/mongo/db/commands/apply_ops.cpp')
-rw-r--r--src/mongo/db/commands/apply_ops.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/commands/apply_ops.cpp b/src/mongo/db/commands/apply_ops.cpp
index a189af5db6f..b86d8716d08 100644
--- a/src/mongo/db/commands/apply_ops.cpp
+++ b/src/mongo/db/commands/apply_ops.cpp
@@ -59,7 +59,7 @@ namespace mongo {
// applyOps can do pretty much anything, so require all privileges.
RoleGraph::generateUniversalPrivileges(out);
}
- virtual bool run(const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
+ virtual bool newRun(TransactionExperiment* txn, const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
if ( cmdObj.firstElement().type() != Array ) {
errmsg = "ops has to be an array";
@@ -84,7 +84,6 @@ namespace mongo {
// SERVER-4328 todo : is global ok or does this take a long time? i believe multiple
// ns used so locking individually requires more analysis
Lock::GlobalWrite globalWriteLock;
- DurTransaction txn;
// Preconditions check reads the database state, so needs to be done locked
if ( cmdObj["preCondition"].type() == Array ) {
@@ -132,7 +131,7 @@ namespace mongo {
invariant(Lock::nested());
Client::Context ctx(ns);
- bool failed = applyOperation_inlock(&txn, ctx.db(), temp, false, alwaysUpsert);
+ bool failed = applyOperation_inlock(txn, ctx.db(), temp, false, alwaysUpsert);
ab.append(!failed);
if ( failed )
errors++;
@@ -163,7 +162,7 @@ namespace mongo {
}
}
- logOp(&txn, "c", tempNS.c_str(), cmdBuilder.done());
+ logOp(txn, "c", tempNS.c_str(), cmdBuilder.done());
}
return errors == 0;