Repository navigation
Notify running jobs on SQLite cancellation - #1398
Merged
Merged
Conversation
bgentry
force-pushed
the
bg/sqlite-job-cancel-notification
branch
2 times, most recently
from
September 27, 2026 22:03
2083565 to
c4d68ee
Compare
brandur
approved these changes
Sep 27, 2026
bgentry
force-pushed
the
bg/sqlite-job-cancel-notification
branch
from
September 27, 2026 22:09
c4d68ee to
0968ba0
Compare
bgentry
enabled auto-merge (squash)
September 27, 2026 22:09
SQLite clients rely on the notification outbox to cancel running job contexts. `JobCancel` marks a job for cancellation without writing a control notification, so workers keep running indefinitely. Insert a cancel notification through sqlc in the same transaction as the job update. The outbox row becomes visible only when `JobCancelTx` commits, and an empty control topic leaves direct driver calls valid. Exercise worker context cancellation across SQLite variants, along with notification delivery on commit and absence on rollback.
bgentry
force-pushed
the
bg/sqlite-job-cancel-notification
branch
from
September 27, 2026 22:12
0968ba0 to
0b52826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLite's
JobCancelupdates running jobs without writing a control notification. Because SQLite supports listeners, workers can remain unaware of the cancellation.Write the notification to the outbox in the same transaction as the job update. Shared driver tests verify worker context cancellation across the supported SQLite variants, delivery after
JobCancelTxcommits, and no delivery after rollback.