[DRIVERS-556] Implement Convenient API for Transactions Created: 03/Aug/18 Updated: 02/Feb/24 Resolved: 14/Apr/23 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Epic | Priority: | Major - P3 |
| Reporter: | Rathi Gnanasekaran | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Cost Threshold %: | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Useful Info Lead: jeff.yemin Spec Links: |
| Comments |
| Comment by Githook User [ 08/Jan/19 ] |
|
Author: {'username': 'jmikola', 'email': 'jmikola@gmail.com', 'name': 'Jeremy Mikola'}Message:
Per the txn spec, only the initial command in a transaction can include a readConcern. Furthermore, afterClusterTime would only be specified if the client session is re-used for a second transaction (only one of our tests).
Asserting a value for txnNumber assumes that retryWrites=true, which may not be the case. Instead, ignore that field entirely and just assert that autocommit is not found. Combined with asserting that startTransaction is not found, we effectively assert that the command is not part of a transaction.
Per the spec, withTransaction should abort if the callback reports an error and the session is in the "starting" or "in progress" state.
Since drivers internally retry commitTransaction, these tests should expect an additional command before the entire transaction is retried. The fail point must also trigger a second time to overcome the driver's internal retry behavior and allow withTransaction() to retry the entire transaction.
This also consolidates repeated test content with YAML references.
|