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

Improve synchronization between two fail points

    XMLWordPrintable

    Details

      Description

      Currently, in order to synchronize two fail points, we have to call checkLog and sometimes clearLog to verify when a failpoint has started to know when we can safely start performing test asserts if we want to validate the intermediary states of an operation.

      The existing syntax can often be very verbose and not very intuitive. We propose extending the current configureFailPoint command to allow specifying more explicit relationships between failpoints, more specifically that a failpoint will be able to signal other failpoints or also wait for a specific signal to be broadcasted before unblocking itself.

      Proposed syntax:

      {configureFailPoint: “failpoint1”, mode: “<mode>”, sync: {signals: [signal1, signal2], waitFor: [signal3, signal4], timeout: 100, clearSignal: <true/false>}}
      

      With the above syntax, failpoint1 will emit signals signal1 and signal2, and then block itself until signal3 and signal4 are broadcasted or timeout after 100 seconds. The clearSignal boolean indicates whether signal3 and signal4 should be cleared once they are consumed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: