spicedb
spicedb copied to clipboard
Determine if it is faster to retry an entire transaction from scratch vs. savepoints in cockroachdb
The recommended way to retry transactions in cockroachdb is to set a special savepoint and rollback to when a retry transaction error is recieved.
The savepointing appears to add a detectible latency to calls that are made retry-able (TODO: get numbers). Depending on the frequency we see retries, it may be worth trading a slower retry (cancel the entire transaction and retry it) in order to avoid savepoints entirely.
This requires testing and metrics to determine a path forward.