diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2020-01-27 22:38:45 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-01-27 22:38:45 +0000 |
commit | 872e41c2f37722ae2c8f9d119d3b6417f086a284 (patch) | |
tree | 578bb8db5a45cae3621af1c78701af3a23fb7d46 | |
parent | 030e23ae359c05bb7585a7a223a2ddf84a6d4178 (diff) | |
download | mongo-872e41c2f37722ae2c8f9d119d3b6417f086a284.tar.gz |
SERVER-44998 Add server parameter to support commit quorum for two phase index builds.
-rw-r--r-- | etc/evergreen.yml | 34 | ||||
-rw-r--r-- | jstests/noPassthrough/libs/index_build.js | 10 | ||||
-rw-r--r-- | src/mongo/db/storage/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/storage_engine_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/two_phase_index_build_knobs.idl (renamed from src/mongo/db/storage/enable_two_phase_index_build.idl) | 8 |
5 files changed, 54 insertions, 2 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 80c0f1417c4..cc43136679e 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -10084,6 +10084,40 @@ buildvariants: - name: .sharding .jscore !.wo_snapshot !.multi_stmt - name: .sharding .common !.multiversion +- name: enterprise-rhel-62-64-bit-two-phase-index-build-majority-commit-quorum-on + display_name: "Enterprise RHEL 6.2 (2 phase index build majority commit quorum on)" + modules: + - enterprise + run_on: + - rhel62-small + expansions: &enterprise-rhel-62-64-bit-two-phase-index-build-majority-commit-quorum-on + test_flags: >- + --mongodSetParameters="{enableIndexBuildMajorityCommitQuorum: true}" + compile_flags: >- + -j$(grep -c ^processor /proc/cpuinfo) + --ssl + --variables-files=etc/scons/mongodbtoolchain_v3_gcc.vars + MONGO_DISTMOD=rhel62 + multiversion_platform: rhel62 + multiversion_edition: enterprise + repo_edition: enterprise + scons_cache_scope: shared + large_distro_name: rhel62-large + tasks: + - name: compile_TG + distros: + - rhel62-large + - name: .concurrency !.large !.ubsan !.no_txns !.debug_only + - name: .jscore .common + - name: noPassthrough_gen + - name: noPassthroughWithMongod_gen + - name: .replica_sets !.encrypt !.auth + distros: + - rhel62-large + - name: .rollbackfuzzer + - name: .sharding .jscore !.wo_snapshot !.multi_stmt + - name: .sharding .common !.multiversion + - name: enterprise-rhel-62-64-bit-coverage display_name: "~ Enterprise RHEL 6.2 DEBUG Code Coverage" modules: diff --git a/jstests/noPassthrough/libs/index_build.js b/jstests/noPassthrough/libs/index_build.js index eb8d640ffb7..fa8fc380242 100644 --- a/jstests/noPassthrough/libs/index_build.js +++ b/jstests/noPassthrough/libs/index_build.js @@ -195,4 +195,14 @@ class IndexBuildTest { const storageEngineSection = serverStatus.storageEngine; return storageEngineSection.supportsTwoPhaseIndexBuild; } + + /** + * Returns true if majority commit quorum is supported by two phase index builds. + */ + static supportsIndexBuildMajorityCommitQuorum(conn) { + return assert + .commandWorked( + conn.adminCommand({getParameter: 1, enableIndexBuildMajorityCommitQuorum: 1})) + .enableIndexBuildMajorityCommitQuorum; + } } diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript index 90bccfd8e41..84ef52957c3 100644 --- a/src/mongo/db/storage/SConscript +++ b/src/mongo/db/storage/SConscript @@ -437,7 +437,7 @@ env.Library( source=[ 'storage_engine_impl.cpp', 'kv/temporary_kv_record_store.cpp', # TODO: SERVER-41892 Avoid source under kv sub-directory - env.Idlc('enable_two_phase_index_build.idl')[0], + env.Idlc('two_phase_index_build_knobs.idl')[0], ], LIBDEPS=[ '$BUILD_DIR/mongo/base', diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp index 15dc613ebe3..a7072f74a45 100644 --- a/src/mongo/db/storage/storage_engine_impl.cpp +++ b/src/mongo/db/storage/storage_engine_impl.cpp @@ -45,10 +45,10 @@ #include "mongo/db/operation_context_noop.h" #include "mongo/db/server_options.h" #include "mongo/db/storage/durable_catalog_feature_tracker.h" -#include "mongo/db/storage/enable_two_phase_index_build_gen.h" #include "mongo/db/storage/kv/kv_engine.h" #include "mongo/db/storage/kv/temporary_kv_record_store.h" #include "mongo/db/storage/storage_repair_observer.h" +#include "mongo/db/storage/two_phase_index_build_knobs_gen.h" #include "mongo/db/unclean_shutdown.h" #include "mongo/stdx/unordered_map.h" #include "mongo/util/assert_util.h" diff --git a/src/mongo/db/storage/enable_two_phase_index_build.idl b/src/mongo/db/storage/two_phase_index_build_knobs.idl index acc98d12d3e..1b29ea40481 100644 --- a/src/mongo/db/storage/enable_two_phase_index_build.idl +++ b/src/mongo/db/storage/two_phase_index_build_knobs.idl @@ -38,3 +38,11 @@ server_parameters: cpp_vartype: bool cpp_varname: "enableTwoPhaseIndexBuild" default: true + + # Commit quorum option is supported only for two phase index builds. + enableIndexBuildMajorityCommitQuorum: + description: "Support for using majority commit quorum for two phase index builds." + set_at: startup + cpp_vartype: bool + cpp_varname: "enableIndexBuildMajorityCommitQuorum" + default: false |