test_kind: js_test selector: roots: - jstests/core/**/*.js exclude_files: # Transactions do not support retryability of individual operations. # TODO: Remove this once it is supported (SERVER-33952). - jstests/core/txns/**/*.js # No-op retries are not ignored by top, the profiler, or opcount. - jstests/core/**/operation_latency_histogram.js - jstests/core/**/profile2.js - jstests/core/**/profile3.js - jstests/core/**/profile_findandmodify.js - jstests/core/**/top.js - jstests/core/views/views_stats.js # TODO SERVER-31242: findAndModify no-op retry should respect the fields option. - jstests/core/**/crud_api.js - jstests/core/**/find_and_modify.js - jstests/core/**/find_and_modify2.js - jstests/core/**/find_and_modify_server6865.js - jstests/core/**/project_with_collation.js # Stepdown commands during fsync lock will fail. - jstests/core/**/currentop.js - jstests/core/**/fsync.js - jstests/core/**/killop_drop_collection.js # Expect drops/creates to fail or have a certain response: - jstests/core/**/explain_upsert.js - jstests/core/**/indexes_multiple_commands.js # Expect certain responses, but retries of successfully completed commands may return # different values: - jstests/core/**/create_indexes.js - jstests/core/**/objid5.js # Expect results to return in a certain order, secondaries may apply ops out of order. - jstests/core/**/coveredIndex1.js - jstests/core/**/sortc.js - jstests/core/**/bench_test*.js # benchRun() used for writes - jstests/core/**/benchrun_pipeline_updates.js # benchRun() used for writes - jstests/core/**/connection_string_validation.js # Does not expect a replica set connection string. - jstests/core/**/explain_large_bounds.js # Stepdown can timeout waiting for global lock. - jstests/core/**/list_collections_filter.js # Temporary collections are dropped on failover. - jstests/core/**/startup_log.js # Checks pid, which is different on each server. # Creates new mongo connection but won't retry connecting. - jstests/core/**/shell_connection_strings.js # Inserts enough data that recovery takes more than 8 seconds, so we never get a working primary. - jstests/core/**/geo_s2ordering.js # The following tests fail because a certain command or functionality is not supported on # mongos. This command or functionality is placed in a comment next to the failing test. - jstests/core/**/dbhash.js # dbhash. - jstests/core/**/dbhash2.js # dbhash. # The following tests fail because mongos behaves differently from mongod when testing certain # functionality. The differences are in a comment next to the failing test. - jstests/core/**/explain_missing_database.js # Behavior with no db different on mongos. - jstests/core/**/geo_2d_explain.js # executionSuccess in different spot in explain(). - jstests/core/**/geo_s2explain.js # inputStage in different spot in explain(). - jstests/core/**/geo_s2sparse.js # keysPerIndex in different spot in validate(). # This file is testing resmoke's multiversion framework, not Server behavior - jstests/core/**/mixed_version_replica_set.js # TODO SERVER-61050 - jstests/core/timeseries/timeseries_merge.js # Explain doesn't support read concern majority in sharding. - jstests/core/**/command_let_variables.js exclude_with_any_tags: - assumes_against_mongod_not_mongos - assumes_standalone_mongod # Tests tagged with the following will fail because they assume collections are not sharded. - assumes_no_implicit_collection_creation_after_drop - assumes_no_implicit_index_creation - assumes_unsharded_collection - cannot_create_unique_index_when_using_hashed_shard_key # Tests tagged with the following will fail because commands like `explain` does not support majority read concern - assumes_read_concern_local ## # The next four tags correspond to the special errors thrown by the auto_retry_on_network_error.js # override when it refuses to run a certain command. Above each tag are the message(s) that cause # the tag to be warranted. ## # "Refusing to run a test that issues a getMore command since if a network error occurs during # it then we won't know whether the cursor was advanced or not" - requires_getmore # "Refusing to run a test that issues non-retryable write operations since the test likely makes # assertions on the write results and can lead to spurious failures if a network error occurs" - requires_non_retryable_writes # "Refusing to run a test that issues commands that are not blindly retryable" # "Refusing to run a test that issues an aggregation command with $out because it is not # retryable" - requires_non_retryable_commands # "Refusing to run a test that issues commands that may return different values after a failover" # "Refusing to run a test that issues an aggregation command with explain because it may return # incomplete results" # "Refusing to run a test that issues an aggregation command with # $listLocalSessions because it relies on in-memory state that may not survive failovers" # "Refusing to run a test that issues a mapReduce command, because it calls std::terminate() if # interrupted by a stepdown" - does_not_support_stepdowns ## # The next three tags correspond to the special errors thrown by the # set_read_and_write_concerns.js override when it refuses to replace the readConcern or # writeConcern of a particular command. Above each tag are the message(s) that cause the tag to be # warranted. ## # "Cowardly refusing to override read concern of command: ..." - assumes_read_concern_unchanged # "Cowardly refusing to override write concern of command: ..." - assumes_write_concern_unchanged ## # The next three tags corresponds to the special errors thrown by the # fail_unclean_shutdown_incompatible_commands.js override when it refuses to run commands that are # inaccurate after an unclean shutdown. Above each tag is the message that causes the tag to be # warranted. ## # "Cowardly fail if fastcount is run with a mongod that had an unclean shutdown: ..." - requires_fastcount # "Cowardly fail if dbStats is run with a mongod that had an unclean shutdown: ..." - requires_dbstats # "Cowardly fail if collStats is run with a mongod that had an unclean shutdown: ..." - requires_collstats # "Cowardly fail if unbounded dataSize is run with a mongod that had an unclean shutdown: ..." - requires_datasize ## The next tag corresponds to long running-operations, as they may exhaust their number # of retries and result in a network error being thrown. - operations_longer_than_stepdown_interval # Operations in the main test shell aren't guaranteed to be causally consistent with operations # performed earlier in a parallel shell if multiple nodes are electable because the latest # operation and cluster times aren't shared between shells. # "Cowardly refusing to run test with network retries enabled when it uses startParallelShell()" - uses_parallel_shell # Used for tests which can run in multiversion configurations but cannot run while a replica set # or shard is being actively upgraded or downgraded. - cannot_run_during_upgrade_downgrade - requires_timeseries # Transactions not supported executor: archive: tests: true hooks: - CheckReplDBHash - CheckReplOplogs - ValidateCollections config: shell_options: eval: >- testingReplication = true; load('jstests/libs/override_methods/network_error_and_txn_override.js'); db = connect(TestData.connectionString); load("jstests/libs/override_methods/enable_sessions.js"); load("jstests/libs/override_methods/set_read_and_write_concerns.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_incompatible_commands.js"); load("jstests/libs/override_methods/fail_unclean_shutdown_start_parallel_shell.js"); global_vars: TestData: alwaysInjectTransactionNumber: true defaultReadConcernLevel: "majority" logRetryAttempts: true networkErrorAndTxnOverrideConfig: retryOnNetworkErrors: true overrideRetryAttempts: 3 sessionOptions: readConcern: level: "majority" # Force DBClientRS to find the primary for non-write commands. readPreference: mode: "primary" retryWrites: true # We specify nodb so the shell used by each test will attempt to connect after loading the # retry logic in auto_retry_on_network_error.js. nodb: "" hooks: - class: ContinuousStepdown config_stepdown: false should_downgrade: true # 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: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections - class: CleanEveryN n: 20 fixture: class: ShardedClusterFixture mongos_options: set_parameters: enableTestCommands: 1 mongod_options: enableMajorityReadConcern: '' syncdelay: 5 wiredTigerEngineConfigString: "debug_mode=(table_logging=true)" set_parameters: enableTestCommands: 1 enableElectionHandoff: 0 logComponentVerbosity: replication: heartbeats: 2 rollback: 2 storage: recovery: 2 num_shards: 2 num_rs_nodes_per_shard: 2 configsvr_options: num_nodes: 2 mongod_options: set_parameters: enableTestCommands: 1 shard_options: all_nodes_electable: true replset_config_options: settings: catchUpTimeoutMillis: 0