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
{{ message }}
Repository navigation
Commit 4c85fb4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(worker): bound BullMQ job retention to prevent Redis OOM (#1693)
* fix(worker): bound BullMQ job retention to prevent Redis OOM (SOU-2311)
Completed and failed jobs were retained by age only (14 days) with no
count cap, so Redis memory grew with repo count times reindex frequency.
- Window retention now caps completed jobs at 1 day / 5,000 and failed
jobs at 14 days / 10,000 per queue.
- Queues whose latest job is resolved by the web app (repo-index,
repo-permission-sync, connection-sync, account-permission-sync) use a
new latestPerResource retention: when a job starts, the job it
supersedes for the same resource is removed, keyed by the queue's
deduplication id, with a 7-day age backstop for orphans.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* chore: add changelog entry for #1693
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix(worker): publish repo-index job pointer in onStarted before superseding
trackLatestJob removes a resource's previous job right after onStarted,
which assumes the parent's latest...JobId pointer has already moved.
repo-index wrote latestIndexingJobId inside process instead, so an abort
or DB error before that write could leave the pointer on a removed job.
- Move the pointer write to an onStarted hook (updateMany keyed by repo
id), matching the other latestPerResource workloads.
- Reject a latestPerResource workload without onStarted at registration
so the contract cannot be silently skipped by a future workload.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
### Fixed
19
19
- Made the default home page configurable with `DEFAULT_HOME_VIEW_PAGE`, defaulting to Code Search and supporting Ask. [#1677](https://github.com/sourcebot-dev/sourcebot/pull/1677)
20
20
- Require authentication for the streaming and blocking Ask APIs in Public SaaS deployments. [#1679](https://github.com/sourcebot-dev/sourcebot/pull/1679)
21
+
- Bounded BullMQ job retention to keep Redis memory from growing with repo count, retaining only the latest job per repo, connection, and account. [#1693](https://github.com/sourcebot-dev/sourcebot/pull/1693)
0 commit comments