diff options
author | Huayu Ouyang <huayu.ouyang@mongodb.com> | 2021-11-30 13:38:39 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-30 14:01:28 +0000 |
commit | ce8433059e09747592a6e6d6dae6ed5a1b5aadcc (patch) | |
tree | c90a64f47296785658f090b92842146a5a7ddfec /buildscripts | |
parent | abe980e1db87b2dc635dd94cc9ce37b96fef7fdc (diff) | |
download | mongo-ce8433059e09747592a6e6d6dae6ed5a1b5aadcc.tar.gz |
SERVER-57841 Create passthroughs which run file based initial sync on core and fuzzer
Diffstat (limited to 'buildscripts')
4 files changed, 127 insertions, 5 deletions
diff --git a/buildscripts/resmokeconfig/suites/jstestfuzz_replication_fcbis.yml b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_fcbis.yml new file mode 100644 index 00000000000..0d69d7563d1 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_fcbis.yml @@ -0,0 +1,41 @@ +test_kind: js_test + +selector: + roots: + - jstestfuzz/out/*.js + +executor: + archive: + hooks: + - BackgroundInitialSync + config: + shell_options: + crashOnInvalidBSONError: "" + objcheck: "" + global_vars: + TestData: + ignoreCommandsIncompatibleWithInitialSync: true + hooks: + - class: FuzzerRestoreSettings + - class: BackgroundInitialSync + n: 1 + shell_options: + global_vars: + TestData: + skipValidationOnInvalidViewDefinitions: true + fixture: + class: ReplicaSetFixture + mongod_options: + verbose: '' + set_parameters: + disableLogicalSessionCacheRefresh: false + enableTestCommands: 1 + logComponentVerbosity: + replication: 3 + command: 2 + storage: 1 + transactionLifetimeLimitSeconds: 1 + writePeriodicNoops: 1 + initialSyncMethod: "fileCopyBased" + num_nodes: 2 + start_initial_sync_node: True diff --git a/buildscripts/resmokeconfig/suites/replica_sets_fcbis_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_fcbis_jscore_passthrough.yml new file mode 100644 index 00000000000..9279ad80280 --- /dev/null +++ b/buildscripts/resmokeconfig/suites/replica_sets_fcbis_jscore_passthrough.yml @@ -0,0 +1,70 @@ +test_kind: js_test + +selector: + roots: + - jstests/core/**/*.js + exclude_files: + # Tests that query the system.profile collection cannot run in this suite since an initial sync + # may insert unexpected operations into the profile collection. + - jstests/core/profile_list_collections.js + - jstests/core/profile_list_indexes.js + - jstests/core/recursion.js + - jstests/core/system_profile.js + # operation_latency_histogram.js and geo_s2cursorlimitskip.js do not expect concurrent reads + # against their test collections. + - jstests/core/operation_latency_histogram.js + - jstests/core/geo_s2cursorlimitskip.js + # Having duplicate namespaces is not supported and will cause initial sync to fail. + - jstests/core/views/duplicate_ns.js + # These tests run getLatestProfilerEntry(). The downstream syncing node affects the profiler. + - jstests/core/profile_agg.js + - jstests/core/profile_count.js + - jstests/core/profile_delete.js + - jstests/core/profile_distinct.js + - jstests/core/profile_find.js + - jstests/core/profile_findandmodify.js + - jstests/core/profile_getmore.js + - jstests/core/profile_insert.js + - jstests/core/profile_mapreduce.js + - jstests/core/profile_sampling.js + - jstests/core/profile_update.js + - jstests/core/txns/transactions_profiling.js + # The downstream syncing node affects the top output. + - jstests/core/top.js + # The following tests use fsyncLock which will fail if FCBIS has a backup cursor open. + - jstests/core/currentop.js + - jstests/core/fsync.js + - jstests/core/killop_drop_collection.js + + exclude_with_any_tags: + - assumes_standalone_mongod + - requires_fsync + + +run_hook_interval: &run_hook_interval 20 +executor: + archive: + hooks: + - BackgroundInitialSync + config: + shell_options: + eval: "testingReplication = true;" + hooks: + - class: BackgroundInitialSync + n: *run_hook_interval + - class: CleanEveryN + n: *run_hook_interval + fixture: + class: ReplicaSetFixture + mongod_options: + set_parameters: + enableTestCommands: 1 + collectionClonerBatchSize: 10 + initialSyncOplogFetcherBatchSize: 10 + initialSyncMethod: "fileCopyBased" + logComponentVerbosity: + replication: 3 + command: 2 + storage: 1 + num_nodes: 2 + start_initial_sync_node: True diff --git a/buildscripts/resmokelib/testing/hooks/initialsync.py b/buildscripts/resmokelib/testing/hooks/initialsync.py index 2da12b17bfe..48a0e5f30df 100644 --- a/buildscripts/resmokelib/testing/hooks/initialsync.py +++ b/buildscripts/resmokelib/testing/hooks/initialsync.py @@ -93,9 +93,10 @@ class BackgroundInitialSyncTestCase(jsfile.DynamicJSTestCase): if (err.code != self.INTERRUPTED_DUE_TO_REPL_STATE_CHANGE and err.code != self.INTERRUPTED_DUE_TO_STORAGE_CHANGE): raise - msg = ("Interrupted while waiting for node to reach secondary state, retrying: {}" - ).format(err) - self.logger.error(msg) + msg = ( + "Interrupted while waiting for node to reach secondary state, retrying: {}" + ).format(err) + self.logger.error(msg) # Check if the initial sync node is in SECONDARY state. If it's been 'n' tests, then it # should have waited to be in SECONDARY state and the test should be marked as a failure. @@ -220,7 +221,17 @@ class IntermediateInitialSyncTestCase(jsfile.DynamicJSTestCase): [("replSetTest", 1), ("waitForMemberState", 2), ("timeoutMillis", fixture_interface.ReplFixture.AWAIT_REPL_TIMEOUT_FOREVER_MINS * 60 * 1000)]) - sync_node_conn.admin.command(cmd) + while True: + try: + sync_node_conn.admin.command(cmd) + break + except pymongo.errors.OperationFailure as err: + if (err.code != self.INTERRUPTED_DUE_TO_REPL_STATE_CHANGE + and err.code != self.INTERRUPTED_DUE_TO_STORAGE_CHANGE): + raise + msg = ("Interrupted while waiting for node to reach secondary state, retrying: {}" + ).format(err) + self.logger.error(msg) # Run data validation and dbhash checking. self._js_test_case.run_test() diff --git a/buildscripts/tests/test_burn_in_tags.py b/buildscripts/tests/test_burn_in_tags.py index 83e3c25d097..47ca78791b4 100644 --- a/buildscripts/tests/test_burn_in_tags.py +++ b/buildscripts/tests/test_burn_in_tags.py @@ -178,7 +178,7 @@ CREATE_TEST_MEMBERSHIP_MAP = { "logical_session_cache_standalone_default_refresh_jscore_passthrough", "read_concern_linearizable_passthrough", "read_concern_majority_passthrough", "causally_consistent_read_concern_snapshot_passthrough", - "replica_sets_initsync_jscore_passthrough", + "replica_sets_initsync_jscore_passthrough", "replica_sets_fcbis_jscore_passthrough", "replica_sets_initsync_static_jscore_passthrough", "replica_sets_jscore_passthrough", "replica_sets_kill_primary_jscore_passthrough", "replica_sets_kill_secondaries_jscore_passthrough", |