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 243ccaf
Browse filesBrowse the repository at this point in the historyBrowse files
Let the batch worker's idle behavior be tuned per aggregate (#268)
Every queued write pings the batch worker, which reads the one record
holding the worker's run state. Nothing writes that record while the
worker keeps running, but parking it once the queue drains and waking it
back up both do, and each of those writes makes the enqueues in flight
retry. Waking is worse still: it's written from inside the enqueuing
mutations, so a burst arriving at a parked worker has all of them
fighting over it.
The worker parks a couple of seconds after the queue drains, so a
workload that writes in bursts pays for a park and a wake on every
burst. Polling an empty queue for longer rides out the gaps instead:
bursts closer together than the cooldown never park the worker, and
never contend.
The right trade depends on the write pattern, so expose it as two
optional env vars on the component rather than picking a default. Left
unset, the batch worker's own defaults apply and nothing changes.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments