[SERVER-40574] Retry commitTransaction once in mongo shell Created: 10/Apr/19  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Replication, Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 Description   

The Driver Transactions Specification says (paraphrasing):

The driver will automatically retry the commitTransaction once after a retryable error.

The driver MUST add the "UnknownTransactionCommitResult" error label when commitTransaction fails with a server selection error, network error, retryable writes error, or write concern failed / timeout. If an exception with this label is thrown, an application can safely call commitTransaction again.

See the spec for full details of which errors are retryable.

Let's make the shell's commitTransaction helper match this section of the drivers spec. DBAs may use transactions in the shell for critical tasks. For the sake of both reliability and consistency, the shell should provide them with the same retry logic drivers do.


Generated at Thu Feb 08 04:55:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.