Skip to content

kv: support savepoint rollback recovery from retry error under RC #104233

@nvb

Description

@nvb

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:

// 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

Metadata

Metadata

Assignees

Labels

A-kv-clientRelating to the KV client and the KV interface.A-kv-transactionsRelating to MVCC and the transactional model.A-read-committedRelated to the introduction of Read CommittedC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions