diff options
author | Maria van Keulen <maria@mongodb.com> | 2019-05-29 14:14:26 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2019-05-31 13:27:37 -0400 |
commit | 4a02896895e37f8b576d0bb911606cd4738eb166 (patch) | |
tree | d2fead799a0c19349fe42da1e0f928b50b2c7e3d | |
parent | 0c99d93518b8647a16897a3bf1bb318221a2ccec (diff) | |
download | mongo-4a02896895e37f8b576d0bb911606cd4738eb166.tar.gz |
SERVER-41340 Enable Flow Control by default
-rw-r--r-- | buildscripts/resmokelib/config.py | 3 | ||||
-rw-r--r-- | buildscripts/resmokelib/core/programs.py | 10 | ||||
-rw-r--r-- | buildscripts/resmokelib/parser.py | 8 | ||||
-rw-r--r-- | etc/system_perf.yml | 6 | ||||
-rw-r--r-- | src/mongo/db/storage/flow_control_parameters.idl | 2 |
5 files changed, 15 insertions, 14 deletions
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py index bc245b2e682..4004823845e 100644 --- a/buildscripts/resmokelib/config.py +++ b/buildscripts/resmokelib/config.py @@ -373,7 +373,8 @@ STAGGER_JOBS = None # If set to true, it enables read concern majority. Else, read concern majority is disabled. MAJORITY_READ_CONCERN = None -# If set to true, it enables flow control. Else, flow control is disabled. +# If set to "on", it enables flow control. If set to "off", it disables flow control. If left as +# None, the server's default will determine whether flow control is enabled. FLOW_CONTROL = None # If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py index 881c096d173..ba12be817fe 100644 --- a/buildscripts/resmokelib/core/programs.py +++ b/buildscripts/resmokelib/core/programs.py @@ -119,8 +119,8 @@ def mongod_program( # pylint: disable=too-many-branches if "replSet" in kwargs and "waitForStepDownOnNonCommandShutdown" not in suite_set_parameters: suite_set_parameters["waitForStepDownOnNonCommandShutdown"] = False - if "enableFlowControl" not in suite_set_parameters: - suite_set_parameters["enableFlowControl"] = config.FLOW_CONTROL + if "enableFlowControl" not in suite_set_parameters and config.FLOW_CONTROL is not None: + suite_set_parameters["enableFlowControl"] = (config.FLOW_CONTROL == "on") _apply_set_parameters(args, suite_set_parameters) @@ -276,7 +276,8 @@ def mongo_shell_program( # pylint: disable=too-many-branches,too-many-locals,to # If the 'enableFlowControl' setParameter for mongod was not already specified, we set its value # to a default. - mongod_set_parameters.setdefault("enableFlowControl", config.FLOW_CONTROL) + if config.FLOW_CONTROL is not None: + mongod_set_parameters.setdefault("enableFlowControl", config.FLOW_CONTROL == "on") # If the 'logComponentVerbosity' setParameter for mongos was not already specified, we set its # value to a default. @@ -389,7 +390,8 @@ def dbtest_program(logger, executable=None, suites=None, process_kwargs=None, ** if config.STORAGE_ENGINE is not None: kwargs["storageEngine"] = config.STORAGE_ENGINE - kwargs["flowControl"] = config.FLOW_CONTROL + if config.FLOW_CONTROL is not None: + kwargs["flowControl"] = (config.FLOW_CONTROL == "on") return generic_program(logger, args, process_kwargs=process_kwargs, **kwargs) diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py index 3d3bf63cb5b..ebb0ebd1a0b 100644 --- a/buildscripts/resmokelib/parser.py +++ b/buildscripts/resmokelib/parser.py @@ -250,8 +250,7 @@ def _make_parser(): # pylint: disable=too-many-statements parser.add_option("--flowControl", type="choice", action="store", dest="flow_control", choices=("on", - "off"), metavar="ON|OFF", help=("Enable or disable flow control." - " Defaults to %default.")) + "off"), metavar="ON|OFF", help=("Enable or disable flow control.")) parser.add_option("--storageEngine", dest="storage_engine", metavar="ENGINE", help="The storage engine used by dbtests and jstests.") @@ -382,8 +381,7 @@ def _make_parser(): # pylint: disable=too-many-statements parser.set_defaults(benchrun_device="Desktop", dry_run="off", find_suites=False, list_suites=False, logger_file="console", shuffle="auto", - stagger_jobs="off", suite_files="with_server", majority_read_concern="on", - flow_control="on") + stagger_jobs="off", suite_files="with_server", majority_read_concern="on") return parser @@ -571,7 +569,7 @@ def _update_config_vars(values): # pylint: disable=too-many-statements _config.EXCLUDE_WITH_ANY_TAGS.extend( utils.default_if_none(_tags_from_list(config.pop("exclude_with_any_tags")), [])) _config.FAIL_FAST = not config.pop("continue_on_failure") - _config.FLOW_CONTROL = config.pop("flow_control") == "on" + _config.FLOW_CONTROL = config.pop("flow_control") _config.INCLUDE_WITH_ANY_TAGS = _tags_from_list(config.pop("include_with_any_tags")) _config.GENNY_EXECUTABLE = _expand_user(config.pop("genny_executable")) _config.JOBS = config.pop("jobs") diff --git a/etc/system_perf.yml b/etc/system_perf.yml index ca7c1e45caa..86e02368916 100644 --- a/etc/system_perf.yml +++ b/etc/system_perf.yml @@ -1071,12 +1071,12 @@ buildvariants: - name: linkbench - name: big_update -- name: linux-3-node-replSet-flowcontrol - display_name: Linux 3-Node ReplSet with Flow Control +- name: linux-3-node-replSet-noflowcontrol + display_name: Linux 3-Node ReplSet (Flow Control off) batchtime: 1440 # 24 hours modules: *modules expansions: - setup: replica-flowcontrol + setup: replica-noflowcontrol cluster: replica platform: linux project_dir: *project_dir diff --git a/src/mongo/db/storage/flow_control_parameters.idl b/src/mongo/db/storage/flow_control_parameters.idl index 2dd83afba0a..57a8b47a585 100644 --- a/src/mongo/db/storage/flow_control_parameters.idl +++ b/src/mongo/db/storage/flow_control_parameters.idl @@ -34,7 +34,7 @@ server_parameters: set_at: [ startup, runtime ] cpp_vartype: 'AtomicWord<bool>' cpp_varname: 'gFlowControlEnabled' - default: false + default: true flowControlTargetLagSeconds: description: 'Target maximum majority committed lag with flow control enabled' set_at: [ startup, runtime ] |