[SERVER-47346] Expose transaction-retry-helper as session object function Created: 06/Apr/20 Updated: 06/Dec/22 Resolved: 08/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Sharding
|
| Participants: |
| Description |
|
We should have an easy and standard way of dealing with transient transaction errors in our integration tests. The ideal solution would be something on the line of with_transaction that is provided by the official python driver. A helper function exposed through the session object that takes a function and execute it inside a transaction and is capable of transparently retrying the transaction in the case of transient errors. Taking a quick look at our use-cases, it seems important to provide also the following functionality through this helper:
At the moment we provide a similar helper function that has the following limitations:
We recently introduced another helper function that provides 2 but is very specific and has the same problems as the more general one above. |