diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-10-26 09:05:48 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-10-26 09:05:48 -0400 |
commit | 2d32e99f5e67243f41e91c5d142b2a735e22d46a (patch) | |
tree | 224270dc2d07e4773c0953746ea15134932edaa3 /src/mongo/db/catalog | |
parent | a348801dd5640b0c2cae22f5e3f8017bf5d68465 (diff) | |
download | mongo-2d32e99f5e67243f41e91c5d142b2a735e22d46a.tar.gz |
SERVER-11178: fix drop_dups with index create by putting back logOp after changing delete path
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r-- | src/mongo/db/catalog/index_create.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/index_create.cpp b/src/mongo/db/catalog/index_create.cpp index c08bf38948d..a5e7bc077da 100644 --- a/src/mongo/db/catalog/index_create.cpp +++ b/src/mongo/db/catalog/index_create.cpp @@ -45,6 +45,7 @@ #include "mongo/db/query/internal_plans.h" #include "mongo/db/query/runner_yield_policy.h" #include "mongo/db/repl/is_master.h" +#include "mongo/db/repl/oplog.h" #include "mongo/db/repl/rs.h" #include "mongo/db/structure/collection.h" #include "mongo/util/processinfo.h" @@ -180,7 +181,10 @@ namespace mongo { if (dropDups) { bool runnerEOF = runner->isEOF(); runner->saveState(); - collection->deleteDocument( loc, false, true ); + BSONObj toDelete; + collection->deleteDocument( loc, false, true, &toDelete ); + logOp( "d", ns.c_str(), toDelete ); + if (!runner->restoreState()) { // Runner got killed somehow. This probably shouldn't happen. if (runnerEOF) { |