diff options
author | Judah Schvimer <judah@mongodb.com> | 2016-11-17 15:29:39 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2016-11-17 16:43:23 -0500 |
commit | e9aea748102be9e5b8aac38d4dadd6dc0eb1e32c (patch) | |
tree | d9c47c6fd7d834ccb64c6fcb5154ad53b4c70ba8 | |
parent | 8ab19a65f361a2f0fed4d788368b296f42e43495 (diff) | |
download | mongo-e9aea748102be9e5b8aac38d4dadd6dc0eb1e32c.tar.gz |
SERVER-27080 Temporarily disable resync command on replica sets
(cherry picked from commit 7c569051d2de59b5eaa7ade84ca3279d245ef8ea)
-rw-r--r-- | src/mongo/db/repl/resync.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/repl/resync.cpp b/src/mongo/db/repl/resync.cpp index 663a0174443..9fcaff08bb5 100644 --- a/src/mongo/db/repl/resync.cpp +++ b/src/mongo/db/repl/resync.cpp @@ -83,6 +83,14 @@ public: // Replica set resync. ReplicationCoordinator* replCoord = getGlobalReplicationCoordinator(); if (getGlobalReplicationCoordinator()->getSettings().usingReplSets()) { + // Resync is disabled in production on replica sets until it stabilizes (SERVER-27081). + if (!Command::testCommandsEnabled) { + return appendCommandStatus( + result, + Status(ErrorCodes::OperationFailed, + "Replica sets do not support the resync command")); + } + const MemberState memberState = replCoord->getMemberState(); if (memberState.startup()) { return appendCommandStatus( |