PYTHON-5135 - Rename WriteConcernFailed code name to WriteConcernTimeout (#2214)
This commit is contained in:
parent
dec13a8020
commit
df30eff390
@ -458,10 +458,10 @@ def _max_time_expired_error(exc: PyMongoError) -> bool:
|
||||
|
||||
|
||||
# From the transactions spec, all the retryable writes errors plus
|
||||
# WriteConcernFailed.
|
||||
# WriteConcernTimeout.
|
||||
_UNKNOWN_COMMIT_ERROR_CODES: frozenset = _RETRYABLE_ERROR_CODES | frozenset(
|
||||
[
|
||||
64, # WriteConcernFailed
|
||||
64, # WriteConcernTimeout
|
||||
50, # MaxTimeMSExpired
|
||||
]
|
||||
)
|
||||
|
||||
@ -457,10 +457,10 @@ def _max_time_expired_error(exc: PyMongoError) -> bool:
|
||||
|
||||
|
||||
# From the transactions spec, all the retryable writes errors plus
|
||||
# WriteConcernFailed.
|
||||
# WriteConcernTimeout.
|
||||
_UNKNOWN_COMMIT_ERROR_CODES: frozenset = _RETRYABLE_ERROR_CODES | frozenset(
|
||||
[
|
||||
64, # WriteConcernFailed
|
||||
64, # WriteConcernTimeout
|
||||
50, # MaxTimeMSExpired
|
||||
]
|
||||
)
|
||||
|
||||
@ -739,7 +739,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "InsertOne fails after WriteConcernError WriteConcernFailed",
|
||||
"description": "InsertOne fails after WriteConcernError WriteConcernTimeout",
|
||||
"operations": [
|
||||
{
|
||||
"name": "failPoint",
|
||||
@ -757,7 +757,6 @@
|
||||
],
|
||||
"writeConcernError": {
|
||||
"code": 64,
|
||||
"codeName": "WriteConcernFailed",
|
||||
"errmsg": "waiting for replication timed out",
|
||||
"errInfo": {
|
||||
"wtimeout": true
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"description": "commitTransaction is retried after WriteConcernFailed timeout error",
|
||||
"description": "commitTransaction is retried after WriteConcernTimeout timeout error",
|
||||
"operations": [
|
||||
{
|
||||
"name": "failPoint",
|
||||
@ -74,7 +74,6 @@
|
||||
],
|
||||
"writeConcernError": {
|
||||
"code": 64,
|
||||
"codeName": "WriteConcernFailed",
|
||||
"errmsg": "waiting for replication timed out",
|
||||
"errInfo": {
|
||||
"wtimeout": true
|
||||
@ -236,7 +235,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "commitTransaction is retried after WriteConcernFailed non-timeout error",
|
||||
"description": "commitTransaction is retried after WriteConcernTimeout non-timeout error",
|
||||
"operations": [
|
||||
{
|
||||
"name": "failPoint",
|
||||
@ -254,7 +253,6 @@
|
||||
],
|
||||
"writeConcernError": {
|
||||
"code": 64,
|
||||
"codeName": "WriteConcernFailed",
|
||||
"errmsg": "multiple errors reported"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1176,7 +1176,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed",
|
||||
"description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernTimeout",
|
||||
"operations": [
|
||||
{
|
||||
"object": "testRunner",
|
||||
@ -1338,7 +1338,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed with wtimeout",
|
||||
"description": "add UnknownTransactionCommitResult label to writeConcernError WriteConcernTimeout with wtimeout",
|
||||
"operations": [
|
||||
{
|
||||
"object": "testRunner",
|
||||
@ -1356,7 +1356,6 @@
|
||||
],
|
||||
"writeConcernError": {
|
||||
"code": 64,
|
||||
"codeName": "WriteConcernFailed",
|
||||
"errmsg": "waiting for replication timed out",
|
||||
"errInfo": {
|
||||
"wtimeout": true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user