summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-02-13 09:10:48 -0500
committerEric Milkie <milkie@10gen.com>2014-02-13 09:10:48 -0500
commita003add92d538a4de60d64fa382376177149a0e7 (patch)
tree779659d265dffea9f6ace5b877987e73cc724a32
parent2f3bd6fc8f3b50bf4802f4477c55660355cff9fe (diff)
downloadmongo-a003add92d538a4de60d64fa382376177149a0e7.tar.gz
Revert "SERVER-12662 do not logOp inserts that have no associated diskloc (such as index-already-exists)"
This reverts commit 2f3bd6fc8f3b50bf4802f4477c55660355cff9fe. The commit does not work for _id index builds and will require a more comprehensive solution.
-rw-r--r--src/mongo/db/instance.cpp23
-rw-r--r--src/mongo/db/pdfile.cpp6
2 files changed, 12 insertions, 17 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index b95bcb1bfea..926cdeecdb6 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -792,19 +792,16 @@ namespace mongo {
}
}
- 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);
- }
+ 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);
}
NOINLINE_DECL void insertMulti(bool keepGoing, const char *ns, vector<BSONObj>& objs, CurOp& op) {
diff --git a/src/mongo/db/pdfile.cpp b/src/mongo/db/pdfile.cpp
index 7aaa24a9fbc..b397061c397 100644
--- a/src/mongo/db/pdfile.cpp
+++ b/src/mongo/db/pdfile.cpp
@@ -1316,10 +1316,8 @@ namespace mongo {
void DataFileMgr::insertAndLog( const char *ns, const BSONObj &o, bool god, bool fromMigrate ) {
BSONObj tmp = o;
- DiskLoc loc = insertWithObjMod( ns, tmp, false, god );
- if (!loc.isNull()) {
- logOp( "i", ns, tmp, 0, 0, fromMigrate );
- }
+ insertWithObjMod( ns, tmp, false, god );
+ logOp( "i", ns, tmp, 0, 0, fromMigrate );
}
/** @param o the object to insert. can be modified to add _id and thus be an in/out param