|
In https://jira.mongodb.org/browse/SPEC-1206, the treatment of MaxTimeMSExpired (code=50) changed to be an UnknownTransactionCommitResult (https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#unknowntransactioncommitresult):
> The driver MUST add the "UnknownTransactionCommitResult" error label when commitTransaction fails with a server selection error, network error, retryable writes error,** MaxTimeMSExpired error,** or write concern failed / timeout.
Existing unpinning requirements require to unpin upon an UnknownTransactionCommitResult (https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#when-to-unpin):
> Additionally, drivers MUST unpin a ClientSession when any individual commitTransaction command attempt fails with an UnknownTransactionCommitResult error label.
However, the pinning test in https://github.com/mongodb/specifications/blob/master/source/transactions/tests/pin-mongos.yml#L330 still uses MaxTimeMSExpired error code (50) and requires that the session is NOT unpinned. This test appears to contradict the current spec language requirements.
|