Repository navigation
Description
What happened?
ResumeHandler.resumeWorkflow (amber/src/main/scala/org/apache/texera/amber/engine/architecture/controller/promisehandlers/ResumeHandler.scala:60-70) finishes by emitting ExecutionStatsUpdate and RuntimeStatisticsPersist to the client, but does not emit ExecutionStateUpdate(cp.workflowExecution.getState).
This is asymmetric with PauseHandler.scala:88-90, which does emit the state update at the end of pause.
// PauseHandler (correct)
sendToClient(ExecutionStatsUpdate(stats))
sendToClient(RuntimeStatisticsPersist(stats))
sendToClient(ExecutionStateUpdate(cp.workflowExecution.getState)) // ← present
// ResumeHandler (missing)
sendToClient(ExecutionStatsUpdate(stats))
sendToClient(RuntimeStatisticsPersist(stats))
// ← no ExecutionStateUpdateThe data is already correct on the server side: each resumeWorker(...) returns a WorkerStateResponse and ResumeHandler updates its internal WorkerExecution state with that result, so cp.workflowExecution.getState correctly returns RUNNING after the resume futures complete. The state simply never gets broadcast to clients.
Expected: after resume completes, clients receive ExecutionStateUpdate(RUNNING) (mirroring how pause produces ExecutionStateUpdate(PAUSED)).
Actual: no ExecutionStateUpdate is sent.
Consequences:
ExecutionStatsServiceandExecutionConsoleService(the existing consumers) miss the resume → RUNNING transition unless they observe it indirectly via stats.- Tests that try to wait for "workflow is running again after resume" cannot use the
ExecutionStateUpdatecallback path used elsewhere; they fall back toThread.sleep(e.g.PauseSpec.shouldPause).
How to reproduce?
- Start a workflow via
client.controllerInterface.startWorkflow(...). - Register
client.registerCallback[ExecutionStateUpdate](evt => ...). - Call
client.controllerInterface.pauseWorkflow(...)— observe thatExecutionStateUpdate(PAUSED)fires. - Call
client.controllerInterface.resumeWorkflow(...)— observe that noExecutionStateUpdateevent fires, even though the aggregated state has transitioned back toRUNNING.
A minimal in-tree repro: PauseSpec.shouldPause already had to insert Thread.sleep(400) after resume because no state event arrives.
Version
1.1.0-incubating (Pre-release/Master)
Commit Hash (Optional)
Relevant log output
N/A — the bug is the absence of an event, not a faulty one.
Activity
Yicong-Huang commentedon Apr 26, 2026
Closing — the original motivation (no event-driven signal for resume → RUNNING in tests) is moot.
Await.result(client.controllerInterface.resumeWorkflow(...))already blocks until ResumeHandler finishes, which happens after all worker resume futures have resolved and updated their per-worker state to RUNNING. The asymmetry with PauseHandler exists but adding an extra event broadcast just for symmetry is not justified.