A few river_notification improvements for SQLite - #1381
Conversation
Here, a few minor improvements for `river_notification` inspired somewhat by looking at Active Cable's notifications handling: * Per-topic subscription cursors: Each topic gets its own cursor so that we avoid replaying old notifications in case a client unsubscribes from a topic and later resubscribes. * Notification fetches can read up to 256 notifications at a time (previously we'd only fetch them one at a time). * Cleanup now deletes 10,000 rows (same number as job cleaner + queue cleaner) per batch instead of trying to do all rows beyond a delete horizon. This protects against degenerate cases where some kind of enormous backlog has built up. I honestly thought we were doing the second two already, but apparently not so it's good that we revisited this.
25ee80c to
139b11e
Compare
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
thx. |
Here, a few minor improvements for
river_notificationinspiredsomewhat by looking at Active Cable's notifications handling:
Per-topic subscription cursors: Each topic gets its own cursor so that
we avoid replaying old notifications in case a client unsubscribes
from a topic and later resubscribes.
Notification fetches can read up to 256 notifications at a time
(previously we'd only fetch them one at a time).
Cleanup now deletes 10,000 rows (same number as job cleaner + queue
cleaner) per batch instead of trying to do all rows beyond a delete
horizon. This protects against degenerate cases where some kind of
enormous backlog has built up.
I honestly thought we were doing the second two already, but apparently
not so it's good that we revisited this.