summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rs_sync.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2014-10-14 16:38:46 -0400
committerAndy Schwerin <schwerin@mongodb.com>2014-10-27 16:53:29 -0400
commit3c6d2341f54e272990a5b233e7b7eda39bf7d682 (patch)
tree480038f6ea24121d600e529ea93e7d087f04af74 /src/mongo/db/repl/rs_sync.cpp
parent07c0c80e190206b8e6f037a885bc5971a78cae3e (diff)
downloadmongo-3c6d2341f54e272990a5b233e7b7eda39bf7d682.tar.gz
SERVER-15535 Consider return value of setFollowerMode in call sites that care.
Diffstat (limited to 'src/mongo/db/repl/rs_sync.cpp')
-rw-r--r--src/mongo/db/repl/rs_sync.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/repl/rs_sync.cpp b/src/mongo/db/repl/rs_sync.cpp
index ec31acb65c0..839bae2e188 100644
--- a/src/mongo/db/repl/rs_sync.cpp
+++ b/src/mongo/db/repl/rs_sync.cpp
@@ -213,7 +213,9 @@ namespace repl {
syncDoInitialSync();
continue; // start from top again in case sync failed.
}
- replCoord->setFollowerMode(MemberState::RS_RECOVERING);
+ if (!replCoord->setFollowerMode(MemberState::RS_RECOVERING)) {
+ continue;
+ }
/* we have some data. continue tailing. */
SyncTail tail(BackgroundSync::get(), multiSyncApply);