summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-03-24 08:38:01 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2015-03-26 05:28:01 -0400
commitc9f935b1b6eea0ce43d01a82600842b0884e1725 (patch)
treef1c758a5bc0f902c5c90cf591250735b4538bdbe
parentb82dcb7415ee4bcb949dacbb1a2347c85008961d (diff)
downloadmongo-c9f935b1b6eea0ce43d01a82600842b0884e1725.tar.gz
SERVER-17677 do not send ReplSetUpdatePosition handshakes when REMOVED
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 66fc496f2b3..ce6b7ea64b8 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -1355,6 +1355,10 @@ namespace {
void ReplicationCoordinatorImpl::prepareReplSetUpdatePositionCommandHandshakes(
std::vector<BSONObj>* handshakes) {
boost::lock_guard<boost::mutex> lock(_mutex);
+ // do not send handshakes if we have been removed from the config
+ if (_selfIndex == -1) {
+ return;
+ }
// handshake objs for ourself and all chained members
for (SlaveInfoVector::const_iterator itr = _slaveInfo.begin();
itr != _slaveInfo.end(); ++itr) {