Support persistent transaction options for custom retry loops
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
We have some transaction options (e.g. transaction timeouts, retry limits) that are persistent across transaction retries. This behavior can be useful if you want to enforce a timeout that starts from the beginning of your first try regardless of how many tries you take.
The persistent aspect of these options only applies if you use `onError` to implement your retry loop. If you instead reset your transaction or create a new one, it will lose all prior state about your number of tries and time spent, and you will need to set those options again.
It's possible for a writer of custom retry loops to implement these features themselves (e.g. by counting retries and/or tracking the current running time of a transaction to adjust the timeout value), but it might be nice to provide a soft reset capability that allows users to utilize the built-in functionality.
Contributor guide
Research direction
Start by reviewing the transaction retry behavior and the onError entry point described in the issue, including how retry limits and timeouts retain state. Define what a soft reset should preserve or reset for custom retry loops, then verify that the proposed behavior supports persistent options without requiring users to recreate them manually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100