summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2011-10-21 11:30:28 -0400
committerKristina <kristina@10gen.com>2011-10-21 11:30:28 -0400
commit8a9c636fbde1e2e3b6d2154616aa80786f845be4 (patch)
tree0d6980dd6c797608979ca2d76528a5270037e7fd
parent85902e0e826ba543f9ea6021e0d370fcc6dd6854 (diff)
downloadmongo-8a9c636fbde1e2e3b6d2154616aa80786f845be4.tar.gz
do not initial sync from a secondary that does not build indexes
-rw-r--r--db/repl/rs_initialsync.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/repl/rs_initialsync.cpp b/db/repl/rs_initialsync.cpp
index 5a540594305..5330c974d54 100644
--- a/db/repl/rs_initialsync.cpp
+++ b/db/repl/rs_initialsync.cpp
@@ -158,6 +158,7 @@ namespace mongo {
for( Member *m = head(); m; m = m->next() ) {
if (!m->hbinfo().up() ||
+ !m->config().buildIndexes ||
(m->state() != MemberState::RS_SECONDARY &&
m->state() != MemberState::RS_PRIMARY) ||
(secondaryOnly && m->state() != MemberState::RS_SECONDARY) ||