|
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.
|