Release savepoints after rollback - #1367
Conversation
|
@stephencelis We'd appreciate it if you could take a look at this pull request when you have a chance. |
|
Thanks for your contribution, will look at it soon |
|
Hi maintainers, this PR has been open for over two weeks. When you have a moment, I would appreciate a review. Thank you. |
|
Can you get the build green first? there are some lint errors. |
|
Fixed in ed1bd70. I moved the internal transaction helper into a Connection extension so the class stays within SwiftLint's type-body limit; behavior is unchanged. CI is running again. |
|
The CI setup fix is pushed in ac903cc. GitHub is waiting for maintainer approval before it can run workflows for the updated fork branch. Could you approve and run the workflow when convenient? |
|
Thanks for the tuist fix |
|
Not sure why the SPM integration tests now fail. Perhaps an update of the macos-15 image (unfortunately these can't be pinned). I'm travelling at the moment and don't have always access to wifi, but will look at this later. |
|
CI follow-up pushed in 99b5938. The earlier macOS 15 SPM The new workflow is waiting for maintainer approval. Could you approve and run it when convenient? |
Summary
Root cause
ROLLBACK TO SAVEPOINTrewinds database changes but leaves the savepoint active. The connection therefore remained inside a transaction after a throwing outermostsavepointblock, causing the next transaction to fail withcannot start a transaction within a transaction.Impact
Failed savepoint blocks now leave the connection ready for subsequent transactions. Normal transaction and successful savepoint behavior are unchanged.
Validation
git diff --check