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

Test idempotency of resharding's oplog application with the resharding fuzzer

    • Fully Compatible
    • v5.0
    • Sharding 2021-06-14, Sharding 2021-05-31
    • 1

      Test cases in resharding_oplog_crud_application_test.cpp provide coverage of the idempotency for single operations. Before introducing various stepdown suites with the resharding fuzzer, it would be helpful to confirm there are no issues with idempotency of sequences of multiple operations. One thought is to add a failpoint which causes ReshardingOplogApplier::_applyBatch() to be called twice with the same batch. This failpoint should be enabled in a new resharding fuzzer task which runs with --numDonors 3 --numRecipients 3 --inPlace yes. For example:

      - <<: *jstestfuzz_template
        name: resharding_fuzzer_idempotency_gen
        tags: ["resharding_fuzzer"]
        commands: 
        - func: "generate fuzzer tasks"
          vars: 
            <<: *jstestfuzz_config_vars
            num_files: 10
            num_tasks: 5
            npm_command: resharding-fuzzer
            jstestfuzz_vars: --numDonors 3 --numRecipients 3 --inPlace yes
            suite: resharding_fuzzer
            resmoke_args: --storageEngine=wiredTiger --mongodSetParameters='{"failpoint.reshardingApplyBatchTwice": {mode: "alwaysOn"}}'
            name: resharding_fuzzer_idempotency
      

      Another option would be to have the failpoint enabled in the ReshardingTest fixture via a TestData parameter which is set in a new resharding_fuzzer_idempotency.yml test suite so engineers don't need to specify --mongodSetParameters to run the configuration locally.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: