Skip to content
Commit Detail

Commit f829544

Author
Justin Mazzola Paluska <jmp@cloudflare.com> 2025-12-16 13:07:15 -0500
Parents
317d69e
Tree
7992b79
Run rollback code in ExplicitTxn dtor before clearing the currentTxn

Cloudflare’s production implementation asserts that all SQLite
operations occur with `currentTxn` set to either an ImplicitTxn or an
ExplicitTxn.  Previously, the ExplicitTxn dtor rolled back the
transaction after setting the `currentTxn` to NoTxn, which caused the
assertion to fail in certain workloads.  The fix is to run the code
that resets `currentTxn` after doing the rollback.

I used Claude to find the bug, but the fix is my own.

Files changed

1 file changed~1 modified