summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/master_slave.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/master_slave.cpp')
-rw-r--r--src/mongo/db/repl/master_slave.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp
index 78b5cc8195c..83e1527ebcc 100644
--- a/src/mongo/db/repl/master_slave.cpp
+++ b/src/mongo/db/repl/master_slave.cpp
@@ -227,7 +227,8 @@ namespace mongo {
and cursor in effect.
*/
void ReplSource::loadAll(SourceVector &v) {
- Client::Context ctx("local.sources");
+ const char* localSources = "local.sources";
+ Client::Context ctx(localSources);
SourceVector old = v;
v.clear();
@@ -236,7 +237,8 @@ namespace mongo {
// check that no items are in sources other than that
// add if missing
int n = 0;
- auto_ptr<Runner> runner(InternalPlanner::collectionScan("local.sources"));
+ auto_ptr<Runner> runner(InternalPlanner::collectionScan(localSources,
+ ctx.db()->getCollection(localSources)));
BSONObj obj;
Runner::RunnerState state;
while (Runner::RUNNER_ADVANCED == (state = runner->getNext(&obj, NULL))) {
@@ -278,7 +280,8 @@ namespace mongo {
}
}
- auto_ptr<Runner> runner(InternalPlanner::collectionScan("local.sources"));
+ auto_ptr<Runner> runner(InternalPlanner::collectionScan(localSources,
+ ctx.db()->getCollection(localSources)));
BSONObj obj;
Runner::RunnerState state;
while (Runner::RUNNER_ADVANCED == (state = runner->getNext(&obj, NULL))) {