diff options
-rw-r--r-- | buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml | 44 | ||||
-rw-r--r-- | buildscripts/resmokelib/config.py | 4 | ||||
-rw-r--r-- | buildscripts/resmokelib/core/programs.py | 6 | ||||
-rw-r--r-- | buildscripts/resmokelib/parser.py | 5 | ||||
-rw-r--r-- | etc/evergreen.yml | 70 |
5 files changed, 127 insertions, 2 deletions
diff --git a/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml new file mode 100644 index 00000000000..fd032bd7afa --- /dev/null +++ b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml @@ -0,0 +1,44 @@ +test_kind: js_test + +selector: + roots: + - jstestfuzz/out/*.js + +executor: + archive: + hooks: + - CheckReplDBHash + - ValidateCollections + config: + shell_options: + readMode: commands + hooks: + - class: ContinuousStepdown + # The CheckReplDBHash hook waits until all operations have replicated to and have been applied + # on the secondaries, so we run the ValidateCollections hook after it to ensure we're + # validating the entire contents of the collection. + - class: CheckReplDBHash + shell_options: + global_vars: + TestData: + skipValidationOnInvalidViewDefinitions: true + - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipValidationOnInvalidViewDefinitions: true + forceValidationWithFeatureCompatibilityVersion: "4.2" + fixture: + class: ReplicaSetFixture + mongod_options: + set_parameters: + disableLogicalSessionCacheRefresh: false + enableElectionHandoff: 0 + enableTestCommands: 1 + transactionLifetimeLimitSeconds: 1 + writePeriodicNoops: 1 + all_nodes_electable: true + num_nodes: 3 + replset_config_options: + settings: + catchUpTimeoutMillis: 0 diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py index 4004823845e..729be502a8f 100644 --- a/buildscripts/resmokelib/config.py +++ b/buildscripts/resmokelib/config.py @@ -55,6 +55,7 @@ DEFAULTS = { "dry_run": None, "exclude_with_any_tags": None, "flow_control": None, + "flow_control_tickets": None, "genny_executable": None, "include_with_any_tags": None, "jobs": 1, @@ -377,6 +378,9 @@ MAJORITY_READ_CONCERN = None # None, the server's default will determine whether flow control is enabled. FLOW_CONTROL = None +# If set, it ensures Flow Control only ever assigns this number of tickets in one second. +FLOW_CONTROL_TICKETS = None + # If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified # storage engine. STORAGE_ENGINE = None diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py index ba12be817fe..d5c7e49b3f9 100644 --- a/buildscripts/resmokelib/core/programs.py +++ b/buildscripts/resmokelib/core/programs.py @@ -122,6 +122,12 @@ def mongod_program( # pylint: disable=too-many-branches if "enableFlowControl" not in suite_set_parameters and config.FLOW_CONTROL is not None: suite_set_parameters["enableFlowControl"] = (config.FLOW_CONTROL == "on") + if ("failpoint.flowControlTicketOverride" not in suite_set_parameters + and config.FLOW_CONTROL_TICKETS is not None): + suite_set_parameters["failpoint.flowControlTicketOverride"] = { + "mode": "alwaysOn", "data": {"numTickets": config.FLOW_CONTROL_TICKETS} + } + _apply_set_parameters(args, suite_set_parameters) shortcut_opts = { diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py index ebb0ebd1a0b..d37bb06108f 100644 --- a/buildscripts/resmokelib/parser.py +++ b/buildscripts/resmokelib/parser.py @@ -252,6 +252,10 @@ def _make_parser(): # pylint: disable=too-many-statements choices=("on", "off"), metavar="ON|OFF", help=("Enable or disable flow control.")) + parser.add_option("--flowControlTicketOverride", type="int", action="store", + dest="flow_control_tickets", metavar="TICKET_OVERRIDE", + help=("Number of tickets available for flow control.")) + parser.add_option("--storageEngine", dest="storage_engine", metavar="ENGINE", help="The storage engine used by dbtests and jstests.") @@ -570,6 +574,7 @@ def _update_config_vars(values): # pylint: disable=too-many-statements 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") + _config.FLOW_CONTROL_TICKETS = config.pop("flow_control_tickets") _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/evergreen.yml b/etc/evergreen.yml index b6a66b26d88..b400ecb3fc5 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -5267,6 +5267,72 @@ tasks: resmoke_args: --suites=jstestfuzz_interrupt_replication --storageEngine=wiredTiger name: jstestfuzz_interrupt_replication +# jstestfuzz interrupt with flow control engaged # +- <<: *jstestfuzz_template + name: jstestfuzz_interrupt_replication_flow_control_gen + tags: ["jstestfuzz", "interrupt", "flow_control"] + commands: + - func: "generate fuzzer tasks" + vars: + <<: *jstestfuzz_config_vars + jstestfuzz_vars: --jsTestsDir ../jstests + resmoke_args: --suites=jstestfuzz_interrupt_replication --flowControlTicketOverride=1 --storageEngine=wiredTiger + name: jstestfuzz_interrupt_replication_flow_control + +## jstestfuzz sharded cluster continuous stepdown with flow control engaged ## +- <<: *jstestfuzz_template + name: jstestfuzz_sharded_continuous_stepdown_flow_control_gen + tags: ["jstestfuzz", "flow_control"] + commands: + - func: "generate fuzzer tasks" + vars: + <<: *jstestfuzz_config_vars + num_files: 5 + num_tasks: 10 + jstestfuzz_vars: --jsTestsDir ../jstests + resmoke_args: --suites=jstestfuzz_sharded_continuous_stepdown --flowControlTicketOverride=3 --storageEngine=wiredTiger + name: jstestfuzz_sharded_continuous_stepdown_flow_control + +## jstestfuzz concurrent sharded cluster continuous stepdown with flow control engaged ## +- <<: *jstestfuzz_template + name: jstestfuzz_concurrent_sharded_continuous_stepdown_flow_control_gen + tags: ["jstestfuzz", "flow_control"] + commands: + - func: "generate fuzzer tasks" + vars: + <<: *jstestfuzz_config_vars + num_files: ${jstestfuzz_concurrent_num_files|10} + num_tasks: 2 + jstestfuzz_vars: --jsTestsDir ../jstests + resmoke_args: --suites=jstestfuzz_sharded_continuous_stepdown --flowControlTicketOverride=30 --storageEngine=wiredTiger --numClientsPerFixture=10 + name: jstestfuzz_concurrent_sharded_continuous_stepdown_flow_control + +# jstestfuzz replication continuous stepdown with flow control engaged # +- <<: *jstestfuzz_template + name: jstestfuzz_replication_continuous_stepdown_flow_control_gen + tags: ["jstestfuzz", "repl", "flow_control"] + commands: + - func: "generate fuzzer tasks" + vars: + <<: *jstestfuzz_config_vars + jstestfuzz_vars: --jsTestsDir ../jstests + resmoke_args: --suites=jstestfuzz_replication_continuous_stepdown --flowControlTicketOverride=1 --storageEngine=wiredTiger + name: jstestfuzz_replication_continuous_stepdown_flow_control + +## jstestfuzz concurrent replication continuous stepdown with flow control engaged ## +- <<: *jstestfuzz_template + name: jstestfuzz_concurrent_replication_continuous_stepdown_flow_control_gen + tags: ["jstestfuzz", "common", "repl", "flow_control"] + commands: + - func: "generate fuzzer tasks" + vars: + <<: *jstestfuzz_config_vars + num_files: ${jstestfuzz_concurrent_num_files|10} + num_tasks: 15 + jstestfuzz_vars: --jsTestsDir ../jstests + resmoke_args: --suites=jstestfuzz_replication_continuous_stepdown --flowControlTicketOverride=10 --storageEngine=wiredTiger --numClientsPerFixture=10 + name: jstestfuzz_concurrent_replication_continuous_stepdown_flow_control + ## jstestfuzz replica set ## - <<: *jstestfuzz_template name: jstestfuzz_replication_gen @@ -10160,7 +10226,7 @@ buildvariants: - name: jsCore_minimum_batch_size - name: jsCore_op_query - name: jsonSchema - - name: .jstestfuzz + - name: .jstestfuzz !.flow_control - name: .logical_session_cache .repl - name: multiversion - name: .read_write_concern .large @@ -10239,7 +10305,7 @@ buildvariants: - name: jsCore_op_query - name: jsCore_txns_multi_oplog_entries - name: jsonSchema - - name: .jstestfuzz + - name: .jstestfuzz !.flow_control - name: .logical_session_cache - name: .multi_shard .common - name: multi_stmt_txn_jscore_passthrough_with_migration_gen |