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

failCommand should support blockConnection with closeConnection:true

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Service Arch 2021-01-25
    • Story Points:
      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

          Issue Links

            Activity

              People

              Assignee:
              matthew.saltz Matthew Saltz
              Reporter:
              shane.harvey Shane Harvey
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: