Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Feb 8, 2026

Summary

  • The aiosqlite pool unconditionally rolled back on connection release, silently discarding DML changes made without explicit commit(). This caused INSERT ... RETURNING via select_one_or_none to appear successful (returning an ID) but never persist the row to disk.
  • Changed the release() method to commit if in_transaction instead of unconditionally rolling back, matching the sqlite adapter's behavior.

…f rolling back

The aiosqlite pool unconditionally rolled back on connection release,
silently discarding DML changes made without explicit commit. This
caused INSERT ... RETURNING to appear successful but never persist.

Align with the sqlite adapter by committing if in_transaction on release.
@cofin cofin merged commit 5a5f8b2 into main Feb 8, 2026
12 checks passed
@cofin cofin deleted the fix/aiosqlite-commit branch February 8, 2026 01:15
cofin added a commit that referenced this pull request Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant