Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32691

Create passthrough for w="majority" with 2-node replica set to address lost test coverage

    • Fully Compatible
    • ALL
    • v3.6, v3.4, v3.2
    • TIG 2018-02-12, TIG 2018-02-26

      The changes in SERVER-31670 made suites using the ReplicaSetFixture have non-voting secondaries by default unless voting_secondaries=true or all_nodes_electable=True. There are test suites for readConcern={level: "majority"} that were incidentally testing w="majority" writeConcern. However, none of these test suites actually verified that the secondary in a 2-node replica set had applied the write immediately after the client performed a w="majority" write.

      We should add a new write_concern_majority_passthrough.yml test suite that uses both (1) the set_read_and_write_concerns.js override with w="majority" and readConcern={level: "level} and (2) the set_read_preference_secondary.js override. It should be backported to the 3.2, 3.4, and 3.6 branches and run anywhere we already run an of aggregation_read_concern_majority_passthrough.yml, read_concern_linearizable_passthrough.yml, and read_concern_majority_passthrough.yml test suites.


      Original summary

      Passthrough suites using majority writes should have voting secondaries

      Original description

      The changes in SERVER-31670 made suites using the ReplicaSetFixture have non-voting secondaries by default unless voting_secondaries: true or all_nodes_electable:True was specified in the fixture configuration.

      The majority write passthrough suites which use majority writes by default should be updated to have voting secondaries. Otherwise the majority writes are only on the primary, so there isn't much of a purpose to the passthrough.

      The following suites should probably just need voting_secondaries: true set on the ReplicaSetFixture:

      • read_concern_majority_passthrough
      • read_concern_linearizable_passthrough
      • aggregation_read_concern_majority_passthrough

      I think the following suites which use majority writes by default should also be changed:

      • change_streams_secondary_reads

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: