Yicong-Huang opened a new issue, #4513:
URL: https://github.com/apache/texera/issues/4513
### Task Summary
`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` (`PauseHandler.scala:88-90`), which
does emit the state update at the end:
```scala
sendToClient(ExecutionStatsUpdate(stats))
sendToClient(RuntimeStatisticsPersist(stats))
sendToClient(ExecutionStateUpdate(cp.workflowExecution.getState)) // <-
present in PauseHandler
```
The 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 all worker futures complete. There is no
apparent design reason for the asymmetry — it looks like an oversight.
Consequences:
- Test code (e.g. `PauseSpec.shouldPause`) that wants to wait for the
workflow to actually be running again after a resume cannot use the
`ExecutionStateUpdate` callback path used elsewhere; it has to fall back to
`Thread.sleep`.
- `ExecutionStatsService` / `ExecutionConsoleService` (the two existing
consumers of `ExecutionStateUpdate`) miss the resume → RUNNING transition
unless they observe it indirectly via stats updates.
### Proposed change
Add the missing emit at the end of `ResumeHandler.resumeWorkflow`'s `.map {
_ => ... }` block:
```scala
sendToClient(ExecutionStateUpdate(cp.workflowExecution.getState))
```
### Priority
P3 – Low
### Task Type
- [x] Refactor / Cleanup
- [x] Code Implementation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]