You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sqlite: fix handling of "early" context cancellations (#103)
The optional cancellation hook added in #85 and #86 has a deficiency:
If the query successfully completes before its context ends, the cleanup
context would unconditionally trigger an interrupt on the database connection.
That interrupt could race with a subsequent query on that connection, and cause
a spurious cancellation.
To fix this, separate the cleanup context from the input context, and only
effect an interrupt if the _input_ context terminates before cleanup occurs.
Only if cleanup is definitively prior to the query finishing will we effect an
explicit interrupt.
Also:
- Add a test that demonstrates the original problem.
- Update Go version to 1.21
0 commit comments