@@ -64,10 +64,7 @@ string error labels. Drivers may also add error labels to errors that they retur
6464
6565#### Transient Transaction Error
6666
67- Any command error that includes the "TransientTransactionError" error label in the "errorLabels" field. Any network
68- error encountered running any command other than commitTransaction in a transaction. If a network error occurs while
69- running the commitTransaction command then it is not known whether the transaction committed or not, and thus the
70- "TransientTransactionError" label MUST NOT be added.
67+ Any command or network error that includes the "TransientTransactionError" error label in the "errorLabels" field.
7168
7269### ** Naming variations**
7370
@@ -675,12 +672,14 @@ contents of the document.
675672Starting in MongoDB 4.0, any command error may include a top level "errorLabels" field. The field contains an array of
676673string error labels.
677674
678- ### TransientTransactionError
675+ ### Transient Transaction Error
679676
680677Any command error that includes the "TransientTransactionError" error label in the "errorLabels" field. Any network
681678error or server selection error encountered running any command besides commitTransaction in a transaction. In the case
682679of command errors, the server adds the label; in the case of network errors or server selection errors where the client
683- receives no server reply, the client adds the label.
680+ receives no server reply, the client MUST add the label. If a network error occurs while running the commitTransaction
681+ command then it is not known whether the transaction committed or not, and thus the "TransientTransactionError" label
682+ MUST NOT be added.
684683
685684#### Retrying transactions that fail with TransientTransactionError
686685
@@ -1073,6 +1072,9 @@ objective of avoiding duplicate commits.
10731072
10741073## ** Changelog**
10751074
1075+
1076+ - 2024-10-28: Clarify when drivers must add TransientTransactionError label.
1077+
10761078- 2024-10-28: Note read preference must always be primary in a transaction.
10771079
10781080- 2024-05-08: Add bulkWrite to the list of commands allowed in transactions.
0 commit comments