diff options
Diffstat (limited to 'src/mongo/db/instance.cpp')
| -rw-r--r-- | src/mongo/db/instance.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index 926cdeecdb6..b95bcb1bfea 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -792,16 +792,19 @@ namespace mongo { } } - theDataFileMgr.insertWithObjMod(ns, - // May be modified in the call to add an _id field. - js, - // Only permit interrupting an (index build) insert if the - // insert comes from a socket client request rather than a - // parent operation using the client interface. The parent - // operation might not support interrupts. - cc().curop()->parent() == NULL, - false); - logOp("i", ns, js); + DiskLoc dl = theDataFileMgr. + insertWithObjMod(ns, + // May be modified in the call to add an _id field. + js, + // Only permit interrupting an (index build) insert if the + // insert comes from a socket client request rather than a + // parent operation using the client interface. The parent + // operation might not support interrupts. + cc().curop()->parent() == NULL, + false); + if (!dl.isNull()) { + logOp("i", ns, js); + } } NOINLINE_DECL void insertMulti(bool keepGoing, const char *ns, vector<BSONObj>& objs, CurOp& op) { |
