spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Determine if it is faster to retry an entire transaction from scratch vs. savepoints in cockroachdb

Open ecordell opened this issue 4 years ago • 0 comments

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.

ecordell avatar Oct 15 '21 21:10 ecordell