summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2014-05-19 14:36:15 -0400
committerEric Milkie <milkie@10gen.com>2014-05-19 14:36:20 -0400
commitc10e8282a7af38f8512e911a14889e14df8a2c6a (patch)
tree7b9da6678bb4069c2660247b0decf710e99ea134 /src/mongo/db
parentd27c68bba7892266f7d84ba8785cb154fed601b9 (diff)
downloadmongo-c10e8282a7af38f8512e911a14889e14df8a2c6a.tar.gz
SERVER-13822 check for replSet pointer in resync command
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/repl/resync.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repl/resync.cpp b/src/mongo/db/repl/resync.cpp
index c9c608d6f80..6db1ca4c6e2 100644
--- a/src/mongo/db/repl/resync.cpp
+++ b/src/mongo/db/repl/resync.cpp
@@ -68,8 +68,11 @@ namespace mongo {
const std::string ns = parseNs(dbname, cmdObj);
Lock::GlobalWrite globalWriteLock;
Client::Context ctx(ns);
-
if (replSettings.usingReplSets()) {
+ if (!theReplSet) {
+ errmsg = "no replication yet active";
+ return false;
+ }
if (theReplSet->isPrimary()) {
errmsg = "primaries cannot resync";
return false;