[SERVER-53512] failCommand should support blockConnection with closeConnection:true Created: 23/Dec/20  Updated: 29/Oct/23  Resolved: 19/Jan/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Improvement Priority: Major - P3
Reporter: Shane Harvey Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-41070 Add blockConnection mode to failCommand Closed
is related to PYTHON-2462 Implement and test connection pool pa... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2021-01-25
Participants:
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.



 Comments   
Comment by Githook User [ 19/Jan/21 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}

Message: SERVER-53512 Make failCommand failpoint support blockConnection with closeConnection:true
Branch: master
https://github.com/mongodb/mongo/commit/f75145df24d968c4c8b659f6528f7e86da02aa46

Generated at Thu Feb 08 05:31:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.