summaryrefslogtreecommitdiff
path: root/src/mongo/db/db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r--src/mongo/db/db.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index cd9a98b3a7c..93408e92a23 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -752,14 +752,17 @@ namespace mongo {
#ifndef _WIN32
mongo::signalForkSuccess();
#endif
+ {
+ OperationContextImpl txn;
- if(getGlobalAuthorizationManager()->isAuthEnabled()) {
- // open admin db in case we need to use it later. TODO this is not the right way to
- // resolve this.
- Client::WriteContext c("admin", storageGlobalParams.dbpath);
- }
+ if (getGlobalAuthorizationManager()->isAuthEnabled()) {
+ // open admin db in case we need to use it later. TODO this is not the right way to
+ // resolve this.
+ Client::WriteContext ctx(&txn, "admin");
+ }
- authindex::configureSystemIndexes("admin");
+ authindex::configureSystemIndexes(&txn, "admin");
+ }
getDeleter()->startWorkers();