summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2019-07-18 11:39:09 -0400
committerEric Milkie <milkie@10gen.com>2019-07-18 11:39:09 -0400
commitd32e18cf7a584a5c0e4b1c787b600dd0623d7c26 (patch)
treea4f53a62b848f4e8622e7f506ed88c49db9bedc2
parentf4ccbc1c8e75c4752a363d17adb947202fbfdfd9 (diff)
downloadmongo-d32e18cf7a584a5c0e4b1c787b600dd0623d7c26.tar.gz
SERVER-42079 all non-primary index build specs should contain {backgroundSecondary:true}
-rw-r--r--src/mongo/db/catalog/index_catalog_impl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/index_catalog_impl.cpp b/src/mongo/db/catalog/index_catalog_impl.cpp
index 72b69d9c344..56f5348efc6 100644
--- a/src/mongo/db/catalog/index_catalog_impl.cpp
+++ b/src/mongo/db/catalog/index_catalog_impl.cpp
@@ -472,7 +472,7 @@ Status IndexCatalogImpl::IndexBuildBlock::init() {
if (auto replCoord = repl::ReplicationCoordinator::get(_opCtx)) {
isBackgroundSecondaryBuild =
replCoord->getReplicationMode() == repl::ReplicationCoordinator::Mode::modeReplSet &&
- replCoord->getMemberState().secondary() && isBackgroundIndex;
+ !replCoord->getMemberState().primary() && isBackgroundIndex;
}
// Setup on-disk structures.