diff options
Diffstat (limited to 'src/mongo/db/repl/repl_settings.cpp')
-rw-r--r-- | src/mongo/db/repl/repl_settings.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/repl/repl_settings.cpp b/src/mongo/db/repl/repl_settings.cpp index 48dad4218cc..e8cb54d8728 100644 --- a/src/mongo/db/repl/repl_settings.cpp +++ b/src/mongo/db/repl/repl_settings.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/master_slave.h" #include "mongo/db/repl/oplogreader.h" #include "mongo/db/repl/rs.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/db/storage_options.h" #include "mongo/db/wire_version.h" #include "mongo/s/write_ops/batched_command_request.h" @@ -56,7 +55,7 @@ namespace repl { return replSettings.slave || replSettings.master || theReplSet; } - void appendReplicationInfo(OperationContext* txn, BSONObjBuilder& result, int level) { + void appendReplicationInfo(BSONObjBuilder& result, int level) { if ( replSet ) { if( theReplSet == 0 || theReplSet->state().shunned() ) { result.append("ismaster", false); @@ -89,7 +88,7 @@ namespace repl { list<BSONObj> src; { const char* localSources = "local.sources"; - Client::ReadContext ctx(txn, localSources); + Client::ReadContext ctx(localSources, storageGlobalParams.dbpath); auto_ptr<Runner> runner(InternalPlanner::collectionScan(localSources, ctx.ctx().db()->getCollection(localSources))); BSONObj obj; @@ -152,9 +151,7 @@ namespace repl { int level = configElement.numberInt(); BSONObjBuilder result; - - OperationContextImpl txn; // XXX? - appendReplicationInfo(&txn, result, level); + appendReplicationInfo(result, level); return result.obj(); } } replicationInfoServerStatus; @@ -199,7 +196,7 @@ namespace repl { if ( cmdObj["forShell"].trueValue() ) lastError.disableForCommand(); - appendReplicationInfo(txn, result, 0); + appendReplicationInfo(result, 0); result.appendNumber("maxBsonObjectSize", BSONObjMaxUserSize); result.appendNumber("maxMessageSizeBytes", MaxMessageSizeBytes); |