Skip to content

workload/schemachange: handle rollback to savepoint after transaction restart #58068

@jayshrivastava

Description

@jayshrivastava

Describe the problem

If there is a retry error on statement execution, the default behaviour of the workload is to rollback the transaction. However, if there are any savepoints in the transaction (which might occur due to op generation failures), then
we observe a ERROR: restart transaction: TransactionRetryWithProtoRefreshError: cannot rollback to savepoint after a transaction restart (SQLSTATE 40001).

Expected behavior
The workload can expect this error by keeping track of if savepoints have been set in the txn so that it does not fail due to an unexpected error. Alternatively, we can add some logic to create a new txn instead of rolling back when retry errors are seen.

Additional Notes
This issue was observed in these roachtest failures:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-schema-changesA-testingTesting tools and infrastructureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions