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

failCommand should support blockConnection with closeConnection:true

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Service Arch 2021-01-25
    • 2

      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.

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

              Created:
              Updated:
              Resolved: