summaryrefslogtreecommitdiff
path: root/buildscripts/resmokeconfig/suites/tenant_migration_causally_consistent_jscore_passthrough.yml
blob: c639bbfaff229266444a4df4a49c80d4115830be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
config_variables:
- &keyFile jstests/libs/authTestsKey
- &keyFileData Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly
- &authOptions
  authenticationDatabase: admin
  authenticationMechanism: SCRAM-SHA-1
  password: *keyFileData
  username: __system

test_kind: js_test

selector:
  roots:
  - jstests/core/**/*.js
  exclude_files:
  #
  # Denylists from tenant_migration_jscore_passthrough.yml
  #

  - jstests/core/txns/**/*.js
  # Skip any tests that run with auth explicitly.
  - jstests/core/*[aA]uth*.js
  # Commands using UUIDs are not compatible with name-based auth.
  - jstests/core/commands_with_uuid.js
  # These tests depend on hardcoded database name equality.
  - jstests/core/json_schema/misc_validation.js
  - jstests/core/list_databases.js
  - jstests/core/profile1.js
  - jstests/core/profile3.js
  - jstests/core/views/views_stats.js
  # These tests contain assertions on the number of executed operations and this suite retries
  # operations on TenantMigrationAborted errors.
  - jstests/core/find_and_modify_metrics.js
  - jstests/core/update_metrics.js
  - jstests/core/operation_latency_histogram.js
  - jstests/core/top.js
  - jstests/core/profile_sampling.js
  - jstests/core/profile_hide_index.js
  # The override cannot deep copy very large or small dates.
  - jstests/core/index_large_and_small_dates.js
  # This test expects that the connection (i.e. 'threadName') does not change throughout each test
  # case. That is not always true when there is a background tenant migration.
  - jstests/core/failcommand_failpoint.js
  # The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
  # command multiple times, which may observe the change to the failpoint enabled by the migration
  # hook.
  - jstests/core/set_param1.js
  # This test does not support tojson of command objects so the override cannot deep copy the
  # command objects correctly.
  - jstests/core/SERVER-23626.js
  # These tests write with {w: 0} which doesn't wait for the storage transaction writing the
  # document and the oplog entry to commit so the TenantMigrationConflict will not be caught.
  - jstests/core/batch_write_command_w0.js
  - jstests/core/crud_api.js
  # These tests use benchRun which does not use runCommand.
  - jstests/core/bench_test1.js
  - jstests/core/bench_test3.js
  - jstests/core/benchrun_pipeline_updates.js
  # This test uses exhaust which does not use runCommand.
  - jstests/core/exhaust.js
  # These tests use db._authOrThrow which does not use runCommand.
  - jstests/core/auth1.js
  - jstests/core/connection_status.js
  - jstests/core/user_management_helpers.js
  # These tests use legacy read mode which does not use runCommand.
  - jstests/core/comment_field.js
  # This test contains assertions for the hostname that operations run on.
  - jstests/core/currentop_cursors.js
  # Server parameters are stored in-memory only so are not transferred onto the recipient. These
  # tests set the server parameter "notablescan" to force the node to not execute queries that
  # require a collection scan and return an error.
  - jstests/core/notablescan.js
  - jstests/core/notablescan_capped.js
  # These tests run applyOps which is not supported in serverless.
  - jstests/core/apply_ops1.js
  - jstests/core/apply_ops1.js
  - jstests/core/apply_ops2.js
  - jstests/core/apply_ops_dups.js
  - jstests/core/apply_ops_index_collation.js
  - jstests/core/apply_ops_invalid_index_spec.js
  - jstests/core/apply_ops_missing_field.js
  - jstests/core/apply_ops_system_dot_views.js
  - jstests/core/apply_ops_without_ns.js
  - jstests/core/bypass_doc_validation.js
  - jstests/core/collation.js
  - jstests/core/collmod_without_uuid.js
  - jstests/core/txns/commands_banning_txnnumber_outside_transactions.js
  - jstests/core/txns/commands_not_allowed_in_txn.js
  - jstests/core/txns/prepare_transaction_fails_on_temp_collections.js
  - jstests/core/txns/statement_ids_accepted.js
  - jstests/core/list_collections1.js
  - jstests/core/list_collections_filter.js
  - jstests/core/list_collections_no_views.js
  - jstests/core/views/duplicate_ns.js
  - jstests/core/views/view_with_invalid_dbname.js
  - jstests/core/views/views_creation.js
  - jstests/core/views/invalid_system_views.js
  - jstests/core/views/views_all_commands.js
  - jstests/core/rename_collection_staytemp.js

  #
  # Denylists from causally_consistent_jscore_passthrough.yml
  #

  - jstests/core/stages_delete.js # Uses stageDebug command for deletes.
  # Tests that fail for Causal Consistency as they have statements that do not support
  # non-local read concern.
  - jstests/core/geo_big_polygon3.js
  - jstests/core/mr*.js
  - jstests/core/collation.js
  - jstests/core/loadserverscripts.js
  - jstests/core/bypass_doc_validation.js
  - jstests/core/commands_namespace_parsing.js
  - jstests/core/tailable_cursor_invalidation.js
  - jstests/core/tailable_getmore_batch_size.js
  - jstests/core/tailable_skip_limit.js
  - jstests/core/constructors.js
  - jstests/core/views/views_all_commands.js
  - jstests/core/or4.js
  - jstests/core/recursion.js
  # An index drop does not necessarily cause cursors to be killed on the secondary.
  - jstests/core/ord.js
  # The `dbstats` command builds in-memory structures that are not causally consistent.
  - jstests/core/dbstats.js
  # TODO SERVER-30466
  - jstests/core/explain_multi_plan.js
  - jstests/core/explain_shell_helpers.js
  - jstests/core/index_partial_read_ops.js
  - jstests/core/update_arrayFilters.js
  # TODO SERVER-30488
  # In-memory data structures are not causally consistent.
  - jstests/core/apitest_dbcollection.js
  - jstests/core/getmore_invalidated_cursors.js
  - jstests/core/orf.js #explain.executionStats is not CC
  # getMore is not causally consistent if collection is dropped
  - jstests/core/drop3.js
  # Explain format is not the same
  - jstests/core/or_to_in.js # queryPlanner in different spot in explain()

  #
  # Denylists from session_jscore_passthrough.yml
  #

  # These test run commands using legacy queries, which are not supported on sessions.
  - jstests/core/comment_field.js
  - jstests/core/exhaust.js

  # Unacknowledged writes prohibited in an explicit session.
  - jstests/core/crud_api.js
  - jstests/core/batch_write_command_w0.js

  # Causes CappedPositionLost on recipient, which is not recoverable.
  - jstests/core/rename_collection_capped.js

  exclude_with_any_tags:
  - assumes_standalone_mongod
  # These tests run getMore commands which are not supported in the tenant migration passthrough.
  - requires_getmore
  # Due to background tenant migrations, operations in the main test shell are not guaranteed to
  # be causally consistent with operations in a parallel shell. The reason is that
  # TenantMigrationCommitted error is only thrown when the client does a write or a atClusterTime/
  # afterClusterTime or linearlizable read. Therefore, one of shell may not be aware that the
  # migration has occurred and would not forward the read/write command to the right replica set.
  - uses_parallel_shell
  # Profile settings are stored in-memory only so are not transferred to the recipient.
  - requires_profiling
  # emptycapped command is blocked during tenant migration.
  - requires_emptycapped
  # Multi-updates that conflict with tenant migration are not retried by inject_tenant_prefix.js.
  - requires_multi_updates
  ##
  # The next tag corresponds to the special error thrown by the set_read_preference_secondary.js
  # override when it refuses to replace the readPreference of a particular command. Above each tag
  # are the message(s) that cause the tag to be warranted.
  ##
  # "Cowardly refusing to override read preference of command: ..."
  # "Cowardly refusing to run test with overridden read preference when it reads from a
  #  non-replicated collection: ..."
  - assumes_read_preference_unchanged
  - does_not_support_causal_consistency
  - requires_collstats
  # Full validation can cause ongoing queries to fail. This can affect the tenant migration
  # process.
  - uses_full_validation
  - tenant_migration_incompatible

executor:
  archive:
    tests: true
    hooks:
      - CheckReplDBHash
      - CheckReplOplogs
      - ValidateCollections
  config:
    shell_options:
      eval: >-
        testingReplication = true;
        load('jstests/libs/override_methods/inject_tenant_prefix.js');
        load('jstests/libs/override_methods/enable_causal_consistency.js');
        load('jstests/libs/override_methods/enable_sessions.js');
        jsTest.authenticate(db.getMongo());
      global_vars:
        TestData: &TestData
          tenantId: "tenantMigrationTenantId"
          auth: true
          authMechanism: SCRAM-SHA-1
          keyFile: *keyFile
          keyFileData: *keyFileData
          roleGraphInvalidationIsFatal: true
  hooks:
  - class: ContinuousTenantMigration
    shell_options:
      global_vars:
        TestData:
          <<: *TestData
          authOptions: *authOptions
  # 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
    shell_options:
      global_vars:
        TestData: *TestData
  - class: CheckReplDBHash
    shell_options:
      global_vars:
        TestData: *TestData
  - class: ValidateCollections
    shell_options:
      global_vars:
        TestData: *TestData
  - class: CleanEveryN
    n: 20
  fixture:
    class: TenantMigrationFixture
    common_mongod_options:
      set_parameters:
        enableTestCommands: 1
        failpoint.abortTenantMigrationBeforeLeavingBlockingState:
            mode:
              activationProbability: 0.5
        failpoint.pauseTenantMigrationBeforeLeavingBlockingState:
            mode: alwaysOn
            data:
              blockTimeMS: 250
        # Disable some cluster time validation optimizations to get more consistent coverage of
        # gossiping cluster times across tenant migrations.
        failpoint.alwaysValidateClientsClusterTime:
            mode: alwaysOn
        failpoint.externalClientsNeverAuthorizedToAdvanceLogicalClock:
            mode: alwaysOn
        # To avoid routing commands in each test incorrectly, the ContinuousTenantMigration hook
        # only runs donorForgetMigration against the donor of each migration when it is safe to do
        # so. Therefore, the garbage collection delay doesn't need to be large.
        tenantMigrationGarbageCollectionDelayMS: 1
        ttlMonitorSleepSecs: 1
        # Tenant migrations is not currently compatible with implicitly replicated retryable
        # findAndModify images.
        storeFindAndModifyImagesInSideCollection: false
      tlsMode: allowTLS
      tlsCAFile: jstests/libs/ca.pem
      tlsAllowInvalidHostnames: ''
      auth: ''
      keyFile: *keyFile
    per_mongod_options:
      # Each entry is for a different replica set's extra mongod options.
      - tlsCertificateKeyFile: jstests/libs/rs0.pem
      - tlsCertificateKeyFile: jstests/libs/rs1.pem
    num_replica_sets: 2
    num_nodes_per_replica_set: 3
    use_replica_set_connection_string: true
    auth_options: *authOptions