summaryrefslogtreecommitdiff
path: root/src/mongo/db/instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r--src/mongo/db/instance.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index b5886eb5e58..c0da7ea2fc1 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -798,6 +798,10 @@ namespace mongo {
WriteUnitOfWork wunit(txn);
collection = ctx.db()->createCollection( txn, targetNS );
verify( collection );
+ repl::logOp(txn,
+ "c",
+ (ctx.db()->name() + ".$cmd").c_str(),
+ BSON("create" << nsToCollectionSubstring(targetNS)));
wunit.commit();
}
@@ -838,6 +842,10 @@ namespace mongo {
if ( !collection ) {
collection = ctx.db()->createCollection( txn, ns );
verify( collection );
+ repl::logOp(txn,
+ "c",
+ (ctx.db()->name() + ".$cmd").c_str(),
+ BSON("create" << nsToCollectionSubstring(ns)));
}
StatusWith<DiskLoc> status = collection->insertDocument( txn, js, true );