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
[engine] Async post-shutdown task undo is best-effort with asyncOperationsQueueImpl=fast (Conversant queue lacks remove) #5066
Residual from #4954 (PR #5062): PushPullBlockingQueue (Conversant, arcadedb.asyncOperationsQueueImpl=fast) throws UnsupportedOperationException from remove(Object), so scheduleTask's post-shutdown undo (remove the task offered after the dead worker's final drain, then throw) degrades to best-effort: a task offered in that tiny window stays enqueued with completed() never called. The default 'standard' ArrayBlockingQueue is fully covered.
Options: a second drain pass on shutdown, or documenting the fast-queue limitation.
Discovered during the 2026-07 audit follow-up (#4962).
Resolved in #5081 (merged). Investigation went a level deeper than the filed scope: the 'fast' async queue (PushPullBlockingQueue) is an explicit SPSC design, but every worker queue has many producers (application threads, cross-scheduling workers, completion markers, the closing thread) - so it was LOSING tasks in normal operation, not just failing the post-shutdown undo (demonstrated: an 8-producer regression test lost tasks on the old impl). The high-performance profile selects 'fast', so real deployments were exposed.
Fix: 'fast' now maps to DisruptorBlockingQueue - the MPMC flagship from the same Conversant jar (no new dependency), with CAS-claimed sequences and a working remove(Object) that makes the originally-filed shutdown undo work identically on both impls. The second-drain-pass alternative was rejected with evidence (a producer holding a pre-shutdown snapshot can offer arbitrarily late, so no finite pass count is total). Red-first on both defects; the full async battery ran twice (default + -Darcadedb.asyncOperationsQueueImpl=fast), all green. A review round additionally hardened a pre-existing back-pressure divide-by-zero that the weakly-consistent Disruptor size estimates widened.
Activity
lvca commentedon Jul 7, 2026
Unblocked: PR #5072 (which owned the surrounding removeQuietly/scheduleTask code) is merged. This issue is now free to fix without conflict.
Merge pull request #5081 from ArcadeData/fix/5066-fast-queue-shutdown…
lvca commentedon Jul 7, 2026
Resolved in #5081 (merged). Investigation went a level deeper than the filed scope: the 'fast' async queue (
PushPullBlockingQueue) is an explicit SPSC design, but every worker queue has many producers (application threads, cross-scheduling workers, completion markers, the closing thread) - so it was LOSING tasks in normal operation, not just failing the post-shutdown undo (demonstrated: an 8-producer regression test lost tasks on the old impl). Thehigh-performanceprofile selects 'fast', so real deployments were exposed.Fix: 'fast' now maps to
DisruptorBlockingQueue- the MPMC flagship from the same Conversant jar (no new dependency), with CAS-claimed sequences and a workingremove(Object)that makes the originally-filed shutdown undo work identically on both impls. The second-drain-pass alternative was rejected with evidence (a producer holding a pre-shutdown snapshot can offer arbitrarily late, so no finite pass count is total). Red-first on both defects; the full async battery ran twice (default + -Darcadedb.asyncOperationsQueueImpl=fast), all green. A review round additionally hardened a pre-existing back-pressure divide-by-zero that the weakly-consistent Disruptor size estimates widened.fix(ArcadeData#5066): map the 'fast' async queue to the MPMC Disrupto…
fix(#5066): map the 'fast' async queue to the MPMC DisruptorBlockingQ…