summaryrefslogtreecommitdiff
path: root/buildscripts/resmokeconfig/suites/secondary_reads_passthrough.yml
blob: 1dfdbdb80e9c43f0af0ef47b76cf4f322f0a70c9 (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
test_kind: js_test

selector:
  roots:
  - jstests/core/**/*.js
  exclude_files:
  # Operations within a transaction do not support write concern.
  - jstests/core/txns/**/*.js
  # These tests are not expected to pass with replica-sets:
  - jstests/core/dbadmin.js
  - jstests/core/opcounters_write_cmd.js
  - jstests/core/read_after_optime.js
  - jstests/core/capped_update.js
  # These tests attempt to read from the "system.profile" collection, which may be missing entries
  # if a write was performed on the primary of the replica set instead.
  - jstests/core/*profile*.js

  # Tests that fail for Causal Consistency with default injected readPreference 'secondary'
  # "TODO SERVER-30384: These tests assume that documents are returned in the same order they are
  # written when no sort is specified; however, the order of documents within a collection can
  # be different across a primary and secondary."
  - jstests/core/coveredIndex1.js
  - jstests/core/distinct1.js
  - jstests/core/elemMatchProjection.js
  - jstests/core/find4.js
  - jstests/core/find5.js
  - jstests/core/fts1.js
  - jstests/core/find_dedup.js
  - jstests/core/fts_spanish.js
  - jstests/core/geo_distinct.js
  - jstests/core/geo_s2ordering.js
  - jstests/core/nan.js
  - jstests/core/not2.js
  - jstests/core/sorta.js
  - jstests/core/sortc.js
  - jstests/core/sort3.js
  - jstests/core/sort4.js
  - jstests/core/ord.js
  # Parallel shell is not causally consistent
  - jstests/core/cursora.js
  - jstests/core/find_and_modify_concurrent_update.js
  - jstests/core/shellstartparallel.js
  - jstests/core/loadserverscripts.js
  - jstests/core/fsync.js
  # benchRun cannot be overridden to be causally consistent
  - jstests/core/bench_test*.js
  - jstests/core/benchrun_pipeline_updates.js
  # getMore is not causal consistent because afterClusterTime has been specified
  # by the preceding find command which establishes the cursor. Therefore,
  # getMore cannot be guaranteed to get executed after commands in between find
  # and getMore.
  - jstests/core/drop3.js
  - jstests/core/ord.js
  - jstests/core/tailable_cursor_invalidation.js
  - jstests/core/tailable_skip_limit.js
  # doTxn uses a different session so the operationTime of the default session
  # will not be advanced by doTxn. Therefore, operations in the default
  # session cannot be guaranteed to get executed after doTxn.
  - jstests/core/bypass_doc_validation.js
  - jstests/core/collation.js
  # This test runs very slow operations which take a long time to replicate in a 5 node linear
  # chain. This can lead to awaitReplication timeouts when doing consistency checks.
  - jstests/core/text_index_limits.js

  exclude_with_any_tags:
  ##
  # 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
  ##
  # collStats and dbStats are not causally consistent
  - requires_collstats
  - requires_dbstats

executor:
  archive:
    hooks:
      - CheckReplDBHash
      - CheckReplOplogs
      - ValidateCollections
  config:
    shell_options:
      eval: >-
        testingReplication = true;
        load('jstests/libs/override_methods/set_read_preference_secondary.js');
        load('jstests/libs/override_methods/enable_causal_consistency.js');
      readMode: commands
  hooks:
  # 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
  - class: CheckReplDBHash
  - class: ValidateCollections
  - class: CleanEveryN
    n: 20
  fixture:
    class: ReplicaSetFixture
    mongod_options:
      set_parameters:
        enableTestCommands: 1
        # Allow many initial sync attempts. Initial sync may fail if the sync source does not have
        # an oplog yet because it has not conducted its own initial sync yet.
        numInitialSyncAttempts: 10000000
        # TODO SERVER-35156: Remove the following line to disable the periodic no-op
        # writer.
        writePeriodicNoops: true
    linear_chain: true
    num_nodes: 5
    # We give each of the nodes a vote in a 5-node replica set so that the
    # secondaries have different beliefs about the majority commit point
    # relative to the cluster's majority commit point.
    voting_secondaries: true
    use_replica_set_connection_string: true