diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-02-27 16:05:25 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-03-02 17:27:52 -0500 |
commit | 197cdebe7de9be23906c175b31f056c0351e9eb3 (patch) | |
tree | d135a3945c3c522e904b8c68c2a92211cce9a3d2 /src/mongo/db/commands/oplog_note.cpp | |
parent | daf6c05ab22010bb74019189dd4bc4b4347aceb5 (diff) | |
download | mongo-197cdebe7de9be23906c175b31f056c0351e9eb3.tar.gz |
SERVER-17416 MMAP V1 journal thread should check for deadlocks
Also improve the reporting of the Locker::dump function.
Diffstat (limited to 'src/mongo/db/commands/oplog_note.cpp')
-rw-r--r-- | src/mongo/db/commands/oplog_note.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index 3d75399c13d..00b34ead0da 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -32,8 +32,9 @@ #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/auth/resource_pattern.h" -#include "mongo/db/jsobj.h" #include "mongo/db/commands.h" +#include "mongo/db/jsobj.h" +#include "mongo/db/operation_context.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/replication_coordinator_global.h" @@ -77,7 +78,12 @@ namespace mongo { return appendCommandStatus(result, status); } + ScopedTransaction scopedXact(txn, MODE_X); + Lock::GlobalWrite globalWrite(txn->lockState()); + + WriteUnitOfWork wuow(txn); repl::logOpComment(txn, dataElement.Obj()); + wuow.commit(); return true; } |