fix(rivetkit-core): cancel driver alarm before sqlite teardown on destroy - #5530
Conversation
ReviewRe-verified after another rebase (now commit 2f59725), diff is unchanged from the prior review. Small, well-scoped fix. The reordering is correct and fixes a real race. What the change does Moves I traced through the ack path ( This also brings Destroy in line with the existing pattern already used for Minor notes (non-blocking)
No security or naming/style concerns beyond the above. The fix is narrowly targeted and doesn't touch unrelated code paths. |
d84e30f to
b3a2e19
Compare
1a48904 to
858d26f
Compare
858d26f to
84962e8
Compare
b3a2e19 to
3e9dbf4
Compare
3e9dbf4 to
ad0f63f
Compare
84962e8 to
58cfe9e
Compare
58cfe9e to
486fd99
Compare
ad0f63f to
2fd10c6
Compare
2fd10c6 to
cc14c96
Compare
486fd99 to
51bb31e
Compare
cc14c96 to
d902009
Compare
51bb31e to
1cf1038
Compare
1cf1038 to
c0744a7
Compare
7562a64 to
ed6f3b4
Compare
c0744a7 to
2f59725
Compare
Fix alarm-cancel persist racing SQLite teardown on destroy
wait_for_pending_alarm_writes, so the persist it spawns was never awaited before SQLite teardown closed the transaction.cleanup_sqlite: teardown usually won, loggingfailed to persist last pushed actor alarm(transaction_closed) and dropping the durable alarm-clear, leaving stale on-disk alarm state. Timing-dependent and intermittent; destroy-only (sleep never took this path).wait_for_pending_alarm_writesso the drain awaits the persist, which now completes before teardown.[slop]