summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml79
-rw-r--r--buildscripts/resmokeconfig/suites/logical_session_cache_sharding_10sec_refresh_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/logical_session_cache_sharding_1sec_refresh_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/logical_session_cache_sharding_default_refresh_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/sharded_jscore_op_query_txns.yml60
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_jscore_op_query_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml2
-rw-r--r--etc/evergreen.yml20
-rw-r--r--jstests/core/txns/commands_in_txns_read_concern.js1
14 files changed, 170 insertions, 10 deletions
diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml
index 43acd6648de..5506d603170 100644
--- a/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # Don't run these tests as transactions can only run on primaries.
- jstests/core/txns/**/*.js
# Cannot specify afterClusterTime and afterOpTime.
- jstests/core/read_after_optime.js
diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml
index d08ebe60dc6..858e6a5c996 100644
--- a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in causally_consistent_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
# Cannot specify afterClusterTime and afterOpTime.
- jstests/core/read_after_optime.js
diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml
index 469a991f310..bb8b3b087b9 100644
--- a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml
+++ b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml
@@ -13,7 +13,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # TODO: SERVER-47185 Consider creating auth version of jscore_txn test suites
- jstests/core/txns/**/*.js
# Skip any tests that run with auth explicitly.
- jstests/core/*[aA]uth*.js
diff --git a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_passthrough.yml
index 4912a169df9..7a6b6f722fc 100644
--- a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
# The following tests fail because a certain command or functionality is not supported by
# mongos. This command or functionality is placed in a comment next to the failing test.
diff --git a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml
new file mode 100644
index 00000000000..756c38a3ec7
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml
@@ -0,0 +1,79 @@
+test_kind: js_test
+
+selector:
+ roots:
+ - jstests/core/txns/**/*.js
+ exclude_files:
+ # Profile can only be run against the admin database on mongos.
+ - jstests/core/txns/transactions_profiling.js
+ - jstests/core/txns/transactions_profiling_with_drops.js
+
+ # No featureCompatibilityVersion parameter on mongos.
+ - jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js
+
+ # Implicitly creates a database through a collection rename, which does not work in a sharded
+ # cluster.
+ - jstests/core/txns/transactions_block_ddl.js
+
+ # transactionLifetimeLimitSeconds parameter is not available in mongos.
+ - jstests/core/txns/abort_expired_transaction.js
+ - jstests/core/txns/abort_transaction_thread_does_not_block_on_locks.js
+ - jstests/core/txns/kill_op_on_txn_expiry.js
+
+ # Uses hangAfterCollectionInserts failpoint not available on mongos.
+ - jstests/core/txns/speculative_snapshot_includes_all_writes.js
+
+ # View tests aren't expected to work when collections are implicitly sharded.
+ - jstests/core/txns/view_reads_in_transaction.js
+
+ # These workloads explicitly create collections inside multi-document transactions. These are
+ # non-idempotent operations, and the implicit collection sharding logic upon collection access
+ # results in premature collection creation, causing the workloads to fail.
+ - jstests/core/txns/create_collection.js
+ - jstests/core/txns/create_collection_parallel.js
+ - jstests/core/txns/create_indexes.js
+ - jstests/core/txns/create_indexes_parallel.js
+
+ # TODO SERVER-46187: maxTimeMS doesn't work correctly for insert on mongos.
+ - jstests/core/txns/write_conflicts_with_non_txns.js
+
+ exclude_with_any_tags:
+ - assumes_against_mongod_not_mongos
+ # 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
+ # Transactions are not allowed to operate on capped collections.
+ - requires_capped
+ # Prepare is not a command on mongos.
+ - uses_prepare_transaction
+
+executor:
+ archive:
+ hooks:
+ - CheckReplDBHash
+ - ValidateCollections
+ config:
+ shell_options:
+ readMode: commands
+ eval: load("jstests/libs/override_methods/implicitly_shard_accessed_collections.js")
+ hooks:
+ - class: CheckReplDBHash
+ - class: ValidateCollections
+ - class: CleanEveryN
+ n: 20
+ fixture:
+ class: ShardedClusterFixture
+ num_shards: 2
+ enable_balancer: false
+ mongos_options:
+ set_parameters:
+ enableTestCommands: 1
+ disableLogicalSessionCacheRefresh: false
+ logicalSessionRefreshMillis: 100
+ mongod_options:
+ set_parameters:
+ enableTestCommands: 1
+ disableLogicalSessionCacheRefresh: false
+ logicalSessionRefreshMillis: 100
diff --git a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_10sec_refresh_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_10sec_refresh_jscore_passthrough.yml
index 11ee49f8abb..f51b563f0c4 100644
--- a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_10sec_refresh_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_10sec_refresh_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
# The following tests fail because a certain command or functionality is not supported by
# mongos. This command or functionality is placed in a comment next to the failing test.
diff --git a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_1sec_refresh_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_1sec_refresh_jscore_passthrough.yml
index 3a78d304f6b..8bb60d4a7a1 100644
--- a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_1sec_refresh_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_1sec_refresh_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
# The following tests fail because a certain command or functionality is not supported by
# mongos. This command or functionality is placed in a comment next to the failing test.
diff --git a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_default_refresh_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_default_refresh_jscore_passthrough.yml
index 46d2c6deab2..620570f5e78 100644
--- a/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_default_refresh_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/logical_session_cache_sharding_default_refresh_jscore_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough.yml.
- jstests/core/txns/**/*.js
# The following tests fail because a certain command or functionality is not supported by
# mongos. This command or functionality is placed in a comment next to the failing test.
diff --git a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml
index aa0a3605ba3..dbeff382792 100644
--- a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml
@@ -6,7 +6,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in sharded_causally_consistent_jscore_txns_passthrough.
- jstests/core/txns/**/*.js
# Not expected to pass with replica-sets.
- jstests/core/opcounters_write_cmd.js
diff --git a/buildscripts/resmokeconfig/suites/sharded_jscore_op_query_txns.yml b/buildscripts/resmokeconfig/suites/sharded_jscore_op_query_txns.yml
new file mode 100644
index 00000000000..c25798b9b52
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/sharded_jscore_op_query_txns.yml
@@ -0,0 +1,60 @@
+# This test suite exercises core, generic transactions behavior. The tests in this suite, pulled
+# from 'jstests/core/txns', should be "topology agnostic". They ideally generalize to single replica
+# sets and sharded clusters.
+
+test_kind: js_test
+selector:
+ roots:
+ - jstests/core/txns/**/*.js
+ exclude_files:
+ # Profile can only be run against the admin database on mongos.
+ - jstests/core/txns/transactions_profiling.js
+ - jstests/core/txns/transactions_profiling_with_drops.js
+
+ # No featureCompatibilityVersion parameter on mongos.
+ - jstests/core/txns/abort_unprepared_transactions_on_FCV_downgrade.js
+
+ # Implicitly creates a database through a collection rename, which does not work in a sharded
+ # cluster.
+ - jstests/core/txns/transactions_block_ddl.js
+
+ # transactionLifetimeLimitSeconds parameter is not available in mongos.
+ - jstests/core/txns/abort_expired_transaction.js
+ - jstests/core/txns/abort_transaction_thread_does_not_block_on_locks.js
+ - jstests/core/txns/kill_op_on_txn_expiry.js
+
+ # Uses hangAfterCollectionInserts failpoint not available on mongos.
+ - jstests/core/txns/speculative_snapshot_includes_all_writes.js
+
+ # TODO SERVER-46187: maxTimeMS doesn't work correctly for insert on mongos.
+ - jstests/core/txns/write_conflicts_with_non_txns.js
+
+ exclude_with_any_tags:
+ - assumes_against_mongod_not_mongos
+ # Transactions are not allowed to operate on capped collections.
+ - requires_capped
+ # Prepare is not a command on mongos.
+ - uses_prepare_transaction
+executor:
+ archive:
+ hooks:
+ - ValidateCollections
+ config:
+ shell_options:
+ rpcProtocols: opQueryOnly
+ readMode: commands
+ hooks:
+ - class: CheckReplDBHash
+ - class: ValidateCollections
+ - class: CleanEveryN
+ n: 20
+ fixture:
+ class: ShardedClusterFixture
+ mongos_options:
+ set_parameters:
+ enableTestCommands: 1
+ mongod_options:
+ set_parameters:
+ enableTestCommands: 1
+ enable_sharding:
+ - test
diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_op_query_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_op_query_passthrough.yml
index e05fad6eec7..9ac7fc37e0e 100644
--- a/buildscripts/resmokeconfig/suites/sharding_jscore_op_query_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_jscore_op_query_passthrough.yml
@@ -4,7 +4,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in sharded_jscore_op_query_txns.
- jstests/core/txns/**/*.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.
diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
index 3662fee7850..f80237f3f24 100644
--- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
@@ -5,7 +5,7 @@ selector:
roots:
- jstests/core/**/*.js
exclude_files:
- # In MongoDB 4.0, transactions are not supported in sharded clusters.
+ # These tests are run in sharded_jscore_txns.
- jstests/core/txns/**/*.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.
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 3ed7e2473ca..48f75418a26 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -5998,6 +5998,15 @@ tasks:
resmoke_args: --suites=sharded_jscore_txns --storageEngine=wiredTiger
- <<: *task_template
+ name: sharded_jscore_op_query_txns
+ tags: ["sharding", "jscore", "txns"]
+ commands:
+ - func: "do setup"
+ - func: "run tests"
+ vars:
+ resmoke_args: --suites=sharded_jscore_op_query_txns --storageEngine=wiredTiger
+
+- <<: *task_template
name: sharded_jscore_txns_without_snapshot
tags: ["sharding", "wo_snapshot", "jscore"]
commands:
@@ -7229,6 +7238,17 @@ tasks:
resmoke_args: --storageEngine=wiredTiger
fallback_num_sub_suites: 48
+- name: logical_session_cache_sharding_100ms_refresh_jscore_txns_passthrough_gen
+ tags: ["logical_session_cache"]
+ depends_on:
+ - name: jsCore
+ commands:
+ - func: "generate resmoke tasks"
+ vars:
+ depends_on: jsCore
+ resmoke_args: --storageEngine=wiredTiger
+ fallback_num_sub_suites: 10
+
- name: logical_session_cache_sharding_1sec_refresh_jscore_passthrough_gen
tags: ["logical_session_cache", "one_sec"]
depends_on:
diff --git a/jstests/core/txns/commands_in_txns_read_concern.js b/jstests/core/txns/commands_in_txns_read_concern.js
index 587dd6552f4..d873d91cebb 100644
--- a/jstests/core/txns/commands_in_txns_read_concern.js
+++ b/jstests/core/txns/commands_in_txns_read_concern.js
@@ -5,6 +5,7 @@
* # Creating collections inside multi-document transactions is supported only in v4.4
* # onwards.
* requires_fcv_44,
+ * assumes_no_implicit_collection_creation_after_drop,
* uses_snapshot_read_concern]
*/
(function() {