-
Notifications
You must be signed in to change notification settings - Fork 4.1k
workload/schemachange: handle rollback to savepoint after transaction restart #58068
Copy link
Copy link
Closed
Labels
A-schema-changesA-testingTesting tools and infrastructureTesting tools and infrastructureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-changesA-testingTesting tools and infrastructureTesting tools and infrastructureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.