bunqueue v2.8.14
blog · release
bunqueue v2.8.14
Fixes 8 bugs. Concurrency slot leak on lock expiry (lockManager.ts): requeueExpiredJob / handleMaxStallsExceeded now call shard.releaseJobResources() before re-queue/DLQ, mirroring the stall-detection paths.
Bugfixes
Section titled “Bugfixes”The data plane was already bulletproof under the destruction test (exactly-once held through a SIGKILL flood, zero corruption, lossless crash recovery, bad-input isolation). These fixes close feature-conditional defects in the control plane and resource hygiene. No change to data correctness or process stability for the default producer/consumer path.
- Concurrency slot leak on lock expiry (
lockManager.ts):requeueExpiredJob/handleMaxStallsExceedednow callshard.releaseJobResources()before re-queue/DLQ, mirroring the stall-detection paths. Previously a queue withsetConcurrency(N)permanently wedged (throughput → 0) after N lock expiries under worker churn. - Dependency children orphaned (
ack.ts,ackHelpers.ts,dependencyProcessor.ts,push.ts,backgroundTasks.ts,sqlite.ts): a childdependsOna parent that returnedundefined(across a restart) or hadremoveOnComplete: truewas silently never run and dropped after 1h. Added a boundeddepCompletionsset for removeOnComplete parents and made dependency recovery recognizestate='completed'rows (not onlyjob_results). Fixes late-dependent ordering too. addBulk/ PUSHB ignoreddurable(push.ts,sqlite.ts): durable batch jobs sat in the 10ms write buffer instead of being written immediately like a single durable push.insertJobsBatch(jobs, durable)now writes the durable subset to disk atomically (single transaction), bypassing the buffer.- Pool socket drop re-dispatched in-flight jobs (
clientTracking.ts,worker.ts): withpoolSize > 1, dropping the connection that pulled a job re-queued a job a live worker was still running (double execution).releaseClientJobsnow skips jobs whose lock was renewed (renewalCount > 0); the worker renews just-pulled locks immediately so the window cannot open. Worker.close()hang on buffered jobs (worker.ts): a graceful close with group-limited buffered jobs hung forever;close(true)could not pre-empt it. Buffered (pulled-but-unstarted) jobs are now requeued on close, the drain waits only on genuinely in-flight jobs, and a force close pre-empts an in-progress graceful close.- Worker not re-registered after a TCP reconnect (
tcpPool.ts,worker.ts): after a transient drop the worker vanished fromListWorkers/getForQueuewhile still consuming jobs. The pool now exposesonReconnect()and the worker re-registers on reconnect. (Visibility only, no data loss.) moveToWaitingChildrenstranded the job (queryOperations.ts,jobManagement.ts): a job moved to waiting-children was invisible togetJoband uncancellable.getJob/getJobByCustomId/cancelJobnow consultwaitingChildren.perQueueMetricsunbounded growth (queueManager.ts,cleanupTasks.ts): the per-queue metrics map grew one permanent entry per distinct queue name and was not freed byobliterate(). It is now LRU-bounded and freed byobliterate(); cumulative counters survive a transient drain.
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.13 · Release on GitHub · Commits since v2.8.13 · Full changelog · All posts