From baa76f1890f4a9a6507100f9b81b44995adf03e3 Mon Sep 17 00:00:00 2001 From: Kristina Date: Wed, 19 Jan 2011 16:41:57 -0500 Subject: [PATCH] use defaults for rs contexts --- db/repl/rs.cpp | 2 +- db/repl/rs_rollback.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/db/repl/rs.cpp b/db/repl/rs.cpp index 0ce9060a561..c776f46139e 100644 --- a/db/repl/rs.cpp +++ b/db/repl/rs.cpp @@ -467,7 +467,7 @@ namespace mongo { // not sure if this is necessary, maybe just leave the oplog and let // the user delete it if they want the space? writelock lk(rsoplog); - Client::Context c(rsoplog, dbpath, 0, false); + Client::Context c(rsoplog); NamespaceDetails *d = nsdetails(rsoplog); if (d) { string errmsg; diff --git a/db/repl/rs_rollback.cpp b/db/repl/rs_rollback.cpp index cf68b861ae8..d1b60536d56 100644 --- a/db/repl/rs_rollback.cpp +++ b/db/repl/rs_rollback.cpp @@ -198,7 +198,7 @@ namespace mongo { last = time(0); assert( dbMutex.atLeastReadLocked() ); - Client::Context c(rsoplog, dbpath, 0, false); + Client::Context c(rsoplog); NamespaceDetails *nsd = nsdetails(rsoplog); assert(nsd); ReverseCappedCursor u(nsd); @@ -385,7 +385,7 @@ namespace mongo { for( set::iterator i = h.collectionsToResync.begin(); i != h.collectionsToResync.end(); i++ ) { string ns = *i; sethbmsg(str::stream() << "rollback 4.1 coll resync " << ns); - Client::Context c(*i, dbpath, 0, /*doauth*/false); + Client::Context c(*i); try { bob res; string errmsg; @@ -442,7 +442,7 @@ namespace mongo { sethbmsg("rollback 4.6"); /** drop collections to drop before doing individual fixups - that might make things faster below actually if there were subsequent inserts to rollback */ for( set::iterator i = h.toDrop.begin(); i != h.toDrop.end(); i++ ) { - Client::Context c(*i, dbpath, 0, /*doauth*/false); + Client::Context c(*i); try { bob res; string errmsg; @@ -455,7 +455,7 @@ namespace mongo { } sethbmsg("rollback 4.7"); - Client::Context c(rsoplog, dbpath, 0, /*doauth*/false); + Client::Context c(rsoplog); NamespaceDetails *oplogDetails = nsdetails(rsoplog); uassert(13423, str::stream() << "replSet error in rollback can't find " << rsoplog, oplogDetails); @@ -478,7 +478,7 @@ namespace mongo { rs.reset( new RemoveSaver( "rollback" , "" , d.ns ) ); // todo: lots of overhead in context, this can be faster - Client::Context c(d.ns, dbpath, 0, /*doauth*/false); + Client::Context c(d.ns); if( i->second.isEmpty() ) { // wasn't on the primary; delete. /* TODO1.6 : can't delete from a capped collection. need to handle that here. */