-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kv: support savepoint rollback recovery from retry error under RC #104233
Description
With the introduction of the read committed isolation level, transactions running under the isolation level will establish a new read snapshot on each statement boundary (#100133). The fact that each statement runs under a different read snapshot also implies that a savepoint rollback should be able to recover from a non-aborting transaction retry error.
This is currently supported for serializable transactions, but only for savepoints captured at the very beginning of the transaction:
cockroach/pkg/kv/kvclient/kvcoord/txn_coord_sender_savepoints.go
Lines 203 to 207 in db8257a
| // Only savepoints taken before any activity are allowed to be used after a | |
| // transaction restart. | |
| if s.Initial() { | |
| return nil | |
| } |
We will need to generalize the mechanism and decouple it from transaction epochs.
This is a foundational change needed to support #100145.
Jira issue: CRDB-28421