[SERVER-37323] Shell should not mark txn as committed if commitTransaction fails Created: 26/Sep/18 Updated: 27/Oct/23 Resolved: 22/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Backlog - Replication Team |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Operating System: | ALL |
| Participants: |
| Description |
|
The shell currently sets a transaction's `_txnState` to `kCommitted` without checking whether commitTransaction succeeded or not here. This seems incorrect - we should only set the state as committed if transaction successfully committed. |
| Comments |
| Comment by Tess Avitabile (Inactive) [ 22/Jan/19 ] |
|
This behavior is correct according to the drivers spec: https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#committransaction. The rationale is that once the driver/shell has ever sent commitTransaction, it must not perform more CRUD operations or send abortTransaction. Closing as Works As Designed. |