Do not add the RetryableWriteError label to errors that occur during
a write within a transaction (excepting commitTransaction and
abortTransaction)
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
}
},
{
- "description": "add TransientTransactionError label to connection errors",
+ "description": "add TransientTransactionError label to connection errors, but do not add RetryableWriteError label",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": {
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
"TransientTransactionError"
],
"errorLabelsOmit": [
+ "RetryableWriteError",
"UnknownTransactionCommitResult"
]
}
}
}
},
+ {
+ "description": "do not add RetryableWriteError label to writeConcernError ShutdownInProgress that occurs within transaction",
+ "failPoint": {
+ "configureFailPoint": "failCommand",
+ "mode": {
+ "times": 1
+ },
+ "data": {
+ "failCommands": [
+ "insert"
+ ],
+ "writeConcernError": {
+ "code": 91,
+ "errmsg": "Replication is being shut down"
+ }
+ }
+ },
+ "operations": [
+ {
+ "name": "startTransaction",
+ "object": "session0",
+ "arguments": {
+ "options": {
+ "writeConcern": {
+ "w": "majority"
+ }
+ }
+ }
+ },
+ {
+ "name": "insertOne",
+ "object": "collection",
+ "arguments": {
+ "session": "session0",
+ "document": {
+ "_id": 1
+ }
+ },
+ "result": {
+ "errorLabelsContain": [],
+ "errorLabelsOmit": [
+ "RetryableWriteError",
+ "TransientTransactionError",
+ "UnknownTransactionCommitResult"
+ ]
+ }
+ },
+ {
+ "name": "abortTransaction",
+ "object": "session0"
+ }
+ ],
+ "expectations": [
+ {
+ "command_started_event": {
+ "command": {
+ "insert": "test",
+ "documents": [
+ {
+ "_id": 1
+ }
+ ],
+ "ordered": true,
+ "readConcern": null,
+ "lsid": "session0",
+ "txnNumber": {
+ "$numberLong": "1"
+ },
+ "startTransaction": true,
+ "autocommit": false
+ },
+ "command_name": "insert",
+ "database_name": "transaction-tests"
+ }
+ },
+ {
+ "command_started_event": {
+ "command": {
+ "abortTransaction": 1,
+ "lsid": "session0",
+ "txnNumber": {
+ "$numberLong": "1"
+ },
+ "startTransaction": null,
+ "autocommit": false
+ },
+ "command_name": "abortTransaction",
+ "database_name": "admin"
+ }
+ }
+ ],
+ "outcome": {
+ "collection": {
+ "data": []
+ }
+ }
+ },
{
"description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed",
"failPoint": {
