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

failCommand should support blockConnection with closeConnection:true

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • Fully Compatible
    • Service Arch 2021-01-25
    • 2

    Description

      blockConnection/blockTimeMS support was added to failCommand in SERVER-41070. The following failCommand will block for 1000ms before returning a ShutdownInProgress error to the client:

      {
          'configureFailPoint': 'failCommand',
          'mode': {'times': 1},
          'data': {
              'failCommands': ['insert'],
              'blockConnection': true,
              'blockTimeMS': 1000,
              'errorCode': 91,
          },
      }
      

      However, when closeConnection is used, the server will immediately close the connection without blocking:

      {
          'configureFailPoint': 'failCommand',
          'mode': {'times': 1},
          'data': {
              'failCommands': ['insert'],
              'blockConnection': true,
              'blockTimeMS': 1000,
              'closeConnection': true,
          },
      }
      

      It would be useful if the server would first satisfy the blockConnection request and block for blockTimeMS before closing the connection.

      Attachments

        Activity

          People

            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: