summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2019-11-20 18:06:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-20 18:06:40 +0000
commitdd57325049339d9cfa95b9e6ccc7db9168e268c2 (patch)
tree1a7bc511c16f6d48a23fcb2ef258589454df9001
parentddf887d75b1e85762258f0e4953d2bc13562c889 (diff)
downloadmongo-dd57325049339d9cfa95b9e6ccc7db9168e268c2.tar.gz
SERVER-43642 remove IndexBuilder::canBuildInBackground()
-rw-r--r--src/mongo/db/index_builder.cpp4
-rw-r--r--src/mongo/db/index_builder.h2
-rw-r--r--src/mongo/db/repl/SConscript1
-rw-r--r--src/mongo/db/repl/oplog.cpp3
4 files changed, 3 insertions, 7 deletions
diff --git a/src/mongo/db/index_builder.cpp b/src/mongo/db/index_builder.cpp
index 1ab468df447..e664bc428b6 100644
--- a/src/mongo/db/index_builder.cpp
+++ b/src/mongo/db/index_builder.cpp
@@ -72,10 +72,6 @@ IndexBuilder::IndexBuilder(const BSONObj& index,
IndexBuilder::~IndexBuilder() {}
-bool IndexBuilder::canBuildInBackground() {
- return MultiIndexBlock::areHybridIndexBuildsEnabled();
-}
-
std::string IndexBuilder::name() const {
return _name;
}
diff --git a/src/mongo/db/index_builder.h b/src/mongo/db/index_builder.h
index 2b68cd5ee9a..9214abb844e 100644
--- a/src/mongo/db/index_builder.h
+++ b/src/mongo/db/index_builder.h
@@ -94,8 +94,6 @@ public:
*/
Status buildInForeground(OperationContext* opCtx, Database* db, Collection* coll) const;
- static bool canBuildInBackground();
-
private:
Status _build(OperationContext* opCtx, Collection* coll, MultiIndexBlock& indexer) const;
const BSONObj _index;
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index fa004a8413e..d37cc8fe578 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -47,6 +47,7 @@ env.Library(
'$BUILD_DIR/mongo/db/background',
'$BUILD_DIR/mongo/db/catalog/catalog_helpers',
'$BUILD_DIR/mongo/db/catalog/database_holder',
+ '$BUILD_DIR/mongo/db/catalog/multi_index_block',
'$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers',
'$BUILD_DIR/mongo/db/db_raii',
'$BUILD_DIR/mongo/db/dbdirectclient',
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index 54275f80f4e..60d5a3dd60c 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -55,6 +55,7 @@
#include "mongo/db/catalog/drop_collection.h"
#include "mongo/db/catalog/drop_database.h"
#include "mongo/db/catalog/drop_indexes.h"
+#include "mongo/db/catalog/multi_index_block.h"
#include "mongo/db/catalog/rename_collection.h"
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
@@ -141,7 +142,7 @@ bool shouldBuildInForeground(OperationContext* opCtx,
}
// Without hybrid builds enabled, indexes should build with the behavior of their specs.
- bool hybrid = IndexBuilder::canBuildInBackground();
+ bool hybrid = MultiIndexBlock::areHybridIndexBuildsEnabled();
if (!hybrid) {
return !index["background"].trueValue();
}