Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(swing-store): ensure crank savepoint is wrapped in transaction #8429

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented Oct 4, 2023

closes: #8423

Description

SQLite likes to autocommit when not in transactions. That includes releasing a savepoint. Simple change to ensure we've started a transaction before creating a savepoint.

Security Considerations

None

Scaling Considerations

None

Documentation Considerations

Comment added to the code. There didn't seem to be any other relevant documentation

Testing Considerations

With the consistent repro of #8423, I've verified that after the change, following the steps no longer cause an AppHash failure. There does not seem to be a good place to add an automated test for this case.

Upgrade Considerations

None

@mhofman mhofman requested review from warner and FUDCo October 4, 2023 00:39
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. Ouch.

The second tests fails if I comment out the #8423 fix, as expected.
@warner
Copy link
Member

warner commented Oct 4, 2023

Nice! I'm going to push a commit with a unit test that fails without your fix, just for clarity.

Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Please double-check the test I added before landing.

@mhofman mhofman added the automerge:rebase Automatically rebase updates, then merge label Oct 4, 2023
@mergify mergify bot merged commit b9a5cb4 into master Oct 4, 2023
80 checks passed
@mergify mergify bot deleted the mhofman/8423-crank-ensure-transaction branch October 4, 2023 15:37
mhofman pushed a commit that referenced this pull request Nov 8, 2023
…ction

fix(swing-store): ensure crank savepoint is wrapped in transaction
mhofman pushed a commit that referenced this pull request Nov 8, 2023
…ction

fix(swing-store): ensure crank savepoint is wrapped in transaction
mhofman pushed a commit that referenced this pull request Nov 10, 2023
…ction

fix(swing-store): ensure crank savepoint is wrapped in transaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swing-store gets unexpectedly committed between blocks
3 participants