summaryrefslogtreecommitdiff
path: root/buildscripts/resmokeconfig/suites/shard_split_jscore_passthrough.yml
blob: bbf4f369ee4377bdd39f9f1fc37d528b75a1b2e2 (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
# This suite starts a 3-node replica sets and uses the ContinuousShardSplit hook to run background
# shard split operations.

config_variables:
- &keyFile jstests/libs/authTestsKey
- &keyFileData Thiskeyisonlyforrunningthesuitewithauthenticationdontuseitinanytestsdirectly
- &authOptions
  authenticationDatabase: admin
  authenticationMechanism: SCRAM-SHA-256
  password: *keyFileData
  username: __system

test_kind: js_test

selector:
  roots:
  - jstests/core/**/*.js
  exclude_files:
  - jstests/core/txns/**/*.js
  # Skip any tests that run with auth explicitly.
  - jstests/core/administrative/*[aA]uth*.js

  exclude_with_any_tags:
  - assumes_standalone_mongod
  # Cursor ids will not survive rerouting between replica sets during a shard split.
  - requires_getmore
  # Due to background shard splits, 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
  # split 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
  # capped collections are banned in Serverless
  - requires_capped
  # emptycapped command is blocked during shard split.
  - requires_emptycapped
  # Multi-updates that conflict with shard split are not retried by inject_tenant_prefix.js.
  - requires_multi_updates
  # Full validation can cause ongoing queries to fail. This can affect the shard split process.
  - uses_full_validation
  - tenant_migration_incompatible
  - multiple_tenants_incompatible
  - requires_timeseries # Tenant migration not supported

executor:
  archive:
    tests: true
    hooks:
      - CheckReplDBHash
      - CheckReplOplogs
      - ValidateCollections

  config:
    shell_options:
      eval: >-
        testingReplication = true;
        load('jstests/libs/override_methods/inject_tenant_prefix.js');
        jsTest.authenticate(db.getMongo());
      global_vars:
        TestData: &TestData
          # Informs behavior in the inject_tenant_prefix override.
          splitPassthrough: true
          tenantIds: ["636d957b2646ddfaf9b5e13f", "123d957b2646ddfaf9b5e91d"]
          auth: true
          authMechanism: SCRAM-SHA-256
          keyFile: *keyFile
          keyFileData: *keyFileData
          roleGraphInvalidationIsFatal: true
          # Temp collections are removed when the recipient steps up. We expect a mismatch, this
          # ensures we don't compare them.
          skipTempCollections: true

  hooks:
  # Hooks are set up in the order listed here, and torn down in the same order (not as a stack).
  # The ContinuousShardSplit hook must come before CleanEveryN so that the ShardSplitFixture's list
  # of nodes can't be modified while CleanEveryN is running
  - class: ContinuousShardSplit
    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: ShardSplitFixture
    common_mongod_options:
      set_parameters:
        enableTestCommands: 1
        failpoint.abortShardSplitBeforeLeavingBlockingState:
            mode:
              activationProbability: 0.5
        failpoint.pauseShardSplitBeforeLeavingBlockingState:
            mode: alwaysOn
            data:
              blockTimeMS: 250
        shardSplitGarbageCollectionDelayMS: 1
        ttlMonitorSleepSecs: 1
      auth: ''
      keyFile: *keyFile
    num_nodes_per_replica_set: 3
    auth_options: *authOptions