Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
Fully Compatible
-
v4.0
-
Platforms 2018-06-04
Description
Retryable writes now retries upon receiving a write concern error. It'd be nice to add tests to check this in our spec tests.
Currently (per SERVER-34551) we can specify arbitrary error codes like the following shows:
> db.adminCommand({"configureFailPoint": "failCommand", mode: {times:1}, data:{errorCode:11601, closeConnection:false}});
|
> db.runCommand('serverStatus')
|
db.runCommand('serverStatus');
|
{
|
"operationTime" : Timestamp(1525994518, 1),
|
"ok" : 0,
|
"errmsg" : "Failing command due to 'failCommand' failpoint",
|
"code" : 11601,
|
"codeName" : "Interrupted",
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1525994518, 1),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
}
|
}
|
Can we extend the failCommand failpoint to return write concern errors? Something like the following:
> db.adminCommand({configureFailPoint: "failCommand", mode: {times:1}, data:{errorReply: {ok: 1, writeConcernError: {code:91}}, closeConnection:false}});
|
> db.runCommand('serverStatus')
|
{
|
"operationTime" : Timestamp(1525994518, 1),
|
"ok" : 1,
|
"writeConcernError": { "code": 91, "codeName": "ShutdownInProgress" }
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1525994518, 1),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
}
|
}
|
Attachments
Issue Links
- depends on
-
SERVER-35270 StringMap::count()
-
- Closed
-
- is related to
-
SERVER-34551 Add failpoint to fail commands with network errors or arbitrary error codes
-
- Closed
-
- related to
-
SERVER-35004 Add functionality to only fail specific command(s) in failCommand failpoint
-
- Closed
-