cockroachdb / cockroachdb/sqlalchemy-cockroachdb
backoff in the transaction loop is problematic
- Dominant language
- Python
- Stars
- 156
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
In cockroach, when using the `SAVEPOINT cockroach_restart` technique to recover from serializable restarts, the transaction's locks are held across restarts. This enables liveness among contended transactions. In the driver today, there's exponential backoff in those restarts. That means that locks will be held for a long period of inactivity, exacerbating the cost of contention potentially greatly.
See https://github.com/cockroachdb/sqlalchemy-cockroachdb/blob/19e66cce1c1cafaf762cf587d46549dd6b43b3cf/sqlalchemy_cockroachdb/transaction.py#L77-L90
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.