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

Implement failpoint for testing retryable, multi-statement writes

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • Labels:
      None
    • Sharding 2017-10-02, Sharding 2017-10-23

      SERVER-29606 implemented a onPrimaryTransactionalWrite fail point, but its API does not seem suitable for testing retryable behavior for multi-statement write operations, such as this test from the driver spec:

      # description: "BulkWrite succeeds after one network error for each command"
      # Fail point will repeat 5 times, but only the first attempt of each
      # write command will yield a network error. This will allow for the
      # following exchange:
      #
      #  1. delete fails
      #  2. delete is retried and succeeds
      #  3. insert fails
      #  4. insert is retried and succeeds
      #  5. update fails (fail point deactivates)
      #  6. update is retried and succeeds
      

      In this test, the driver's bulkWrite() CRUD method is called with an ordered sequence of delete, insert, and update operations. This will be executed as three write commands. The test suite needs the ability to configure a fail point so that only the first attempt of each of these three write commands fails, in order to verify that the driver successfully retries individual write commands once to allow the entire bulkWrite() to succeed.

      Per kaloian.manassiev's comments:

      We need to allow combination of skip + nTimes (right now they are separate), or add a failpoint for the entire command (as opposed to the separate commits that happen within a command).

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: