diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-05 11:43:52 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-11 12:13:38 -0500 |
commit | d568e329a67eee8ba241d52067750a3d8c42dc0f (patch) | |
tree | e8180ccc44f243f603cb91eaed431afeeabe8676 /buildscripts | |
parent | b54d9905a167867a2655910799573378aff2ce89 (diff) | |
download | mongo-d568e329a67eee8ba241d52067750a3d8c42dc0f.tar.gz |
SERVER-37283 Use stronger locks for system.views
Readers of the view catalog depend on a MODE_IS DB lock preventing
concurrent writes to the view catalog. This is true for regular view
maintenance commands like collMod, create, and drop. However, on
secondaries these commands are replicated as direct writes to
system.views and do not hold as strong of a lock. Further, a user is
permitted to write directly to system.views and so could hit a similar
issue on the primary.
Diffstat (limited to 'buildscripts')
8 files changed, 26 insertions, 6 deletions
diff --git a/buildscripts/resmokeconfig/suites/concurrency_replication_multi_stmt_txn.yml b/buildscripts/resmokeconfig/suites/concurrency_replication_multi_stmt_txn.yml index 415d5bdfcd4..cc33048a6e1 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_replication_multi_stmt_txn.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_replication_multi_stmt_txn.yml @@ -23,6 +23,9 @@ selector: # of a transaction (e.g. ErrorCodes.LockTimeout). - jstests/concurrency/fsm_workloads/drop_index_during_replan.js + # Performs direct writes to system.views + - jstests/concurrency/fsm_workloads/view_catalog_direct_system_writes.js + exclude_with_any_tags: - requires_sharding # Sharing cursors between state functions will fail in this suite because it will attempt to use diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns.yml index 3676e0e1d31..0e4acd4efa7 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns.yml @@ -106,8 +106,6 @@ selector: # collection. - jstests/concurrency/fsm_workloads/kill_aggregation.js - jstests/concurrency/fsm_workloads/kill_rooted_or.js - - jstests/concurrency/fsm_workloads/view_catalog_cycle_with_drop.js - - jstests/concurrency/fsm_workloads/view_catalog.js # Uses getmores. - jstests/concurrency/fsm_workloads/agg_base.js @@ -151,8 +149,11 @@ selector: - jstests/concurrency/fsm_workloads/agg_sort.js - jstests/concurrency/fsm_workloads/collmod.js - jstests/concurrency/fsm_workloads/collmod_separate_collections.js - - jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js - jstests/concurrency/fsm_workloads/invalidated_cursors.js + - jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js + - jstests/concurrency/fsm_workloads/view_catalog.js + - jstests/concurrency/fsm_workloads/view_catalog_cycle_with_drop.js + - jstests/concurrency/fsm_workloads/view_catalog_direct_system_writes.js # The auto_retry_on_network_error.js override needs to overwrite the response from drop on # NamespaceNotFound, and since this workload only creates and drops collections there isn't diff --git a/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns_and_balancer.yml b/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns_and_balancer.yml index 74304822cd7..8560af6de3c 100644 --- a/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns_and_balancer.yml +++ b/buildscripts/resmokeconfig/suites/concurrency_sharded_with_stepdowns_and_balancer.yml @@ -109,8 +109,6 @@ selector: # collection. - jstests/concurrency/fsm_workloads/kill_aggregation.js - jstests/concurrency/fsm_workloads/kill_rooted_or.js - - jstests/concurrency/fsm_workloads/view_catalog_cycle_with_drop.js - - jstests/concurrency/fsm_workloads/view_catalog.js # Uses getmores. - jstests/concurrency/fsm_workloads/agg_base.js @@ -153,8 +151,11 @@ selector: - jstests/concurrency/fsm_workloads/agg_sort.js - jstests/concurrency/fsm_workloads/collmod.js - jstests/concurrency/fsm_workloads/collmod_separate_collections.js - - jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js - jstests/concurrency/fsm_workloads/invalidated_cursors.js + - jstests/concurrency/fsm_workloads/kill_multicollection_aggregation.js + - jstests/concurrency/fsm_workloads/view_catalog.js + - jstests/concurrency/fsm_workloads/view_catalog_cycle_with_drop.js + - jstests/concurrency/fsm_workloads/view_catalog_direct_system_writes.js # The auto_retry_on_network_error.js override needs to overwrite the response from drop on # NamespaceNotFound, and since this workload only creates and drops collections there isn't diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml index 6d30752f79d..1ba72b4bc5c 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml @@ -179,6 +179,9 @@ selector: # TODO: SERVER-38690 Mongos should throw write targeting errors in a transaction. - jstests/core/update_setOnInsert.js + # Reads from system.views. + - jstests/core/views/views_drop.js + ## ## Some aggregation stages don't support snapshot readconcern. ## diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_jscore_passthrough.yml index 7b9234501cc..334ab02f41c 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_jscore_passthrough.yml @@ -79,6 +79,9 @@ selector: # Windows debug builds than other builds. - jstests/core/insert1.js + # Reads from system.views. + - jstests/core/views/views_drop.js + ## ## Some aggregation stages don't support snapshot readconcern. ## 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 e018a67aa39..c5e9e3495e1 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 @@ -78,6 +78,9 @@ selector: # Windows debug builds than other builds. - jstests/core/insert1.js + # Reads from system.views. + - jstests/core/views/views_drop.js + ## ## Some aggregation stages don't support snapshot readconcern. ## diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_stepdown_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_stepdown_jscore_passthrough.yml index 10b599d2ece..4e4584314f9 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_stepdown_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_multi_stmt_txn_stepdown_jscore_passthrough.yml @@ -78,6 +78,9 @@ selector: # Windows debug builds than other builds. - jstests/core/insert1.js + # Reads from system.views. + - jstests/core/views/views_drop.js + ## ## Some aggregation stages don't support snapshot readconcern. ## diff --git a/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml index a2c80ad9dba..e5c200b5c2c 100644 --- a/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml @@ -59,6 +59,9 @@ selector: # Test is only for stand alone mongod. - jstests/core/read_after_optime.js + # Reads from system.views. + - jstests/core/views/views_drop.js + ## ## Limitations with the way the runner file injects transactions. ## |