From 038958ef6ef7351f669d0ddf893546095ad9ab3c Mon Sep 17 00:00:00 2001 From: Gregory Noma Date: Mon, 16 Aug 2021 12:03:00 -0400 Subject: SERVER-59058 Enforce fast count validation in ValidateCollections Python hook --- .../suites/concurrency_sharded_kill_primary_with_balancer.yml | 4 ++++ .../suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml | 4 ++++ .../multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml | 2 +- ...multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml | 4 ---- .../suites/replica_sets_kill_primary_jscore_passthrough.yml | 4 ++++ .../replica_sets_multi_stmt_txn_kill_primary_jscore_passthrough.yml | 4 ++++ ...plica_sets_multi_stmt_txn_terminate_primary_jscore_passthrough.yml | 4 ---- .../suites/replica_sets_reconfig_kill_primary_jscore_passthrough.yml | 4 ++++ .../suites/replica_sets_terminate_primary_jscore_passthrough.yml | 4 ---- .../suites/tenant_migration_kill_primary_jscore_passthrough.yml | 4 ++++ buildscripts/resmokelib/powercycle/powercycle.py | 4 +++- buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py | 4 +++- 12 files changed, 31 insertions(+), 15 deletions(-) (limited to 'buildscripts') diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_kill_primary_with_balancer.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_kill_primary_with_balancer.yml index 11a7ae76525..f3586e85673 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_kill_primary_with_balancer.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_kill_primary_with_balancer.yml @@ -206,6 +206,10 @@ executor: kill: true - class: CheckReplDBHash - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CheckOrphansDeleted - class: CleanupConcurrencyWorkloads fixture: diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml index 089817dbf39..0f1eb074c48 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_multi_stmt_txn_kill_primary.yml @@ -250,6 +250,10 @@ executor: wait_for_mongos_retarget: true - class: CheckReplDBHash - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CheckOrphansDeleted - class: CleanupConcurrencyWorkloads fixture: diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml index beedb9dbdd8..d9c4581dd16 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml @@ -397,7 +397,7 @@ executor: shell_options: global_vars: TestData: - checkCollectionCounts: true + skipEnforceFastCountOnValidate: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml index 16a1ea2dd33..ee88802e137 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml @@ -392,10 +392,6 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections - shell_options: - global_vars: - TestData: - checkCollectionCounts: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/replica_sets_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_kill_primary_jscore_passthrough.yml index 4d7ac98666e..70509fc7c5b 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_kill_primary_jscore_passthrough.yml @@ -156,6 +156,10 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_kill_primary_jscore_passthrough.yml index 433d8a7ed07..470ae885650 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_kill_primary_jscore_passthrough.yml @@ -346,6 +346,10 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_terminate_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_terminate_primary_jscore_passthrough.yml index 81d5855d266..0a7300a1a8b 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_terminate_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_terminate_primary_jscore_passthrough.yml @@ -335,10 +335,6 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections - shell_options: - global_vars: - TestData: - checkCollectionCounts: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/replica_sets_reconfig_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_reconfig_kill_primary_jscore_passthrough.yml index 7462c89afb2..afb8a8e2373 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_reconfig_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_reconfig_kill_primary_jscore_passthrough.yml @@ -180,6 +180,10 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/replica_sets_terminate_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_terminate_primary_jscore_passthrough.yml index 22e53534b16..57472342f04 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_terminate_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_terminate_primary_jscore_passthrough.yml @@ -139,10 +139,6 @@ executor: - class: CheckReplOplogs - class: CheckReplDBHash - class: ValidateCollections - shell_options: - global_vars: - TestData: - checkCollectionCounts: true - class: CleanEveryN n: 20 fixture: diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml index c5d6a5c74a3..f283b073351 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml @@ -289,6 +289,10 @@ executor: global_vars: TestData: *TestData - class: ValidateCollections + shell_options: + global_vars: + TestData: + skipEnforceFastCountOnValidate: true - class: CleanEveryN n: 1 fixture: diff --git a/buildscripts/resmokelib/powercycle/powercycle.py b/buildscripts/resmokelib/powercycle/powercycle.py index 56f17b02950..067a706d9d3 100755 --- a/buildscripts/resmokelib/powercycle/powercycle.py +++ b/buildscripts/resmokelib/powercycle/powercycle.py @@ -1560,7 +1560,9 @@ def main(parser_actions, options): # pylint: disable=too-many-branches,too-many host_port = f"localhost:{secret_port}" new_config_file = NamedTempFile.create(suffix=".yml", directory="tmp") temp_client_files.append(new_config_file) - validation_test_data = {"skipValidationOnNamespaceNotFound": True} + validation_test_data = { + "skipValidationOnNamespaceNotFound": True, "allowUncleanShutdowns": True + } new_resmoke_config(with_external_server, new_config_file, validation_test_data) ret, output = resmoke_client(mongo_repo_root_dir, mongo_path, host_port, "jstests/hooks/run_validate_collections.js", new_config_file) diff --git a/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py b/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py index 33b6a405cd0..8e70da8a09f 100644 --- a/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py +++ b/buildscripts/resmokelib/testing/hooks/periodic_kill_secondaries.py @@ -218,7 +218,9 @@ class PeriodicKillSecondariesTestCase(interface.DynamicTestCase): node.preserve_dbpath = preserve_dbpaths[i] def _validate_collections(self, test_report): - validate_test_case = validate.ValidateCollections(self._hook.logger, self.fixture) + validate_test_case = validate.ValidateCollections( + self._hook.logger, self.fixture, + {'global_vars': {'TestData': {'skipEnforceFastCountOnValidate': True}}}) validate_test_case.before_suite(test_report) validate_test_case.before_test(self, test_report) validate_test_case.after_test(self, test_report) -- cgit v1.2.1