summaryrefslogtreecommitdiff
path: root/db/repl.cpp
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2010-09-29 16:47:19 -0400
committerDwight <dwight@10gen.com>2010-09-29 16:47:19 -0400
commitd316fc41a153ab709e92ba1835675e0bf2dd95d9 (patch)
treee8363a99bde9a51883a0f0450c42dfd6decb5ce8 /db/repl.cpp
parent1549d5295ab6a1d96b2f692c2f11006f16e82f89 (diff)
downloadmongo-d316fc41a153ab709e92ba1835675e0bf2dd95d9.tar.gz
resync doesnt work on repl sets - give a good err msg for now
Diffstat (limited to 'db/repl.cpp')
-rw-r--r--db/repl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/repl.cpp b/db/repl.cpp
index 37dea33b6c7..c836b1fd3b2 100644
--- a/db/repl.cpp
+++ b/db/repl.cpp
@@ -221,6 +221,12 @@ namespace mongo {
void help(stringstream&h) const { h << "resync (from scratch) an out of date replica slave.\nhttp://www.mongodb.org/display/DOCS/Master+Slave"; }
CmdResync() : Command("resync") { }
virtual bool run(const string& , BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
+ if( cmdLine.usingReplSets() ) {
+ errmsg = "resync command not currently supported with replica sets. See RS102 info in the mongodb documentations";
+ result.append("info", "http://www.mongodb.org/display/DOCS/Resyncing+a+Very+Stale+Replica+Set+Member");
+ return false;
+ }
+
if ( cmdObj.getBoolField( "force" ) ) {
if ( !waitForSyncToFinish( errmsg ) )
return false;