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] Interrupt handling in parallel graph algorithms merges partial results instead of aborting (wrong answers) #4951
Severity: MEDIUM (silently wrong results on query-kill)
Location:function/graph/GraphAlgorithms.awaitFutures:112-114 (on InterruptedException sets the flag and continues; subsequent f.get() throw, method returns and merges partial chunks), GAVFusedChainOperator.java:209-211 and :295-297 (break then merge), PartitionedTriangleOp.java:100-103 (same, plus abandoned tasks keep writing partialCounts while the caller sums it - array data race).
A PageRank/BFS/Cypher-traversal/triangle query interrupted by a timeout or kill returns incomplete results as success instead of failing.
Fix: on interrupt, cancel outstanding futures and throw (CommandExecutionException/TimeoutException); never merge partial state. Extract one shared await(futures, deadline) helper (the SQLFunctionVectorSparseNeighbors fan-out is the model: shared deadline, drain-all, cancel-on-interrupt) and use it everywhere.
Filed from an internal engine deep-audit (2026-07). Traced to source; verify against current main before fixing and add a regression test.
Fixed in #5009 (merged). GraphAlgorithms.awaitFutures now cancels the outstanding chunks and throws CommandExecutionException on interrupt (flag preserved; a pre-interrupt chunk failure is attached as suppressed) instead of returning normally and letting callers merge partial per-chunk results as a successful answer. The GAV fused-chain operator and the partitioned triangle count (which also summed a partialCounts array that abandoned tasks were still writing) reuse the same hardened helper. The equivalent silent-partial anti-pattern on the SQL parallel-scan path was closed in the same PR: a failed producer fails the query instead of shrinking its result set.
Activity
review(#5009): surface producer failures; abandon-timeout frees parke…
fix(#4948,#4949,#4950,#4951): parallel-scan and graph fan-out safety (#…
lvca commentedon Jul 6, 2026
Fixed in #5009 (merged).
GraphAlgorithms.awaitFuturesnow cancels the outstanding chunks and throwsCommandExecutionExceptionon interrupt (flag preserved; a pre-interrupt chunk failure is attached as suppressed) instead of returning normally and letting callers merge partial per-chunk results as a successful answer. The GAV fused-chain operator and the partitioned triangle count (which also summed a partialCounts array that abandoned tasks were still writing) reuse the same hardened helper. The equivalent silent-partial anti-pattern on the SQL parallel-scan path was closed in the same PR: a failed producer fails the query instead of shrinking its result set.fix(#4948,#4949,#4950,#4951): parallel-scan and graph fan-out safety (#…
fix(#6568): a fan-out on a shut-down pool fails and takes its outstan…
fix(#6568): an interrupted waiter aborts instead of reclaiming a chun…