summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2014-12-01 06:48:50 -0500
committermatt dannenberg <matt.dannenberg@10gen.com>2014-12-01 08:00:39 -0500
commit583191c572680b710f155b49bb2eb6ea20fbcc6b (patch)
tree37fe904a38eb93c55a9f3bcde117d6c974bb85b9
parentd331763a98ba86dcbfceb155c77fb3cb65deac5d (diff)
downloadmongo-583191c572680b710f155b49bb2eb6ea20fbcc6b.tar.gz
SERVER-15849 fix reversed logic
-rw-r--r--src/mongo/db/repl/sync_source_feedback.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp
index 8fdf7a57261..8f79b84207e 100644
--- a/src/mongo/db/repl/sync_source_feedback.cpp
+++ b/src/mongo/db/repl/sync_source_feedback.cpp
@@ -136,7 +136,7 @@ namespace mongo {
if (!_connection->runCommand("admin", slaveCmd.obj(), slaveRes)) {
if (slaveRes["errmsg"].str().find("node could not be found ")
!= std::string::npos) {
- if (theReplSet->getMutableMember(itr->second->id())) {
+ if (!theReplSet->getMutableMember(itr->second->id())) {
log() << "sync source does not have member " << itr->second->id()
<< " in its config and neither do we, removing member from"
" tracking";
@@ -344,6 +344,9 @@ namespace mongo {
}
if (_positionChanged) {
if (!updateUpstream()) {
+ // no need to set _handshakeNeeded to true as a failed updateUpstream() call
+ // will call resetConnection() and when the new connection is established
+ // the handshake process will be run
_positionChanged = true;
continue;
}