anthonychengit opened a new pull request, #8535: URL: https://github.com/apache/texera/pull/8535
### What changes were proposed in this PR? Move workflow-completion timer cleanup to `WorkflowExecutionManager`, where terminal state is known, and run it under the existing one-shot completion guard. ``` Before: worker callback → wait for stats → region still terminating → cleanup missed After: all regions terminal → completion CAS → state update + timer cleanup once ``` The worker callback still starts the final statistics request, but no longer owns duplicate completion notification or cleanup. ### Any related issues, documentation, discussions? Closes #7032 ### How was this PR tested? Regression coverage verifies cleanup runs exactly once for a completed workflow and never for an uninitialized workflow: ```bash sbt "WorkflowExecutionService / Test / testOnly org.apache.texera.amber.engine.architecture.scheduling.WorkflowExecutionManagerSpec" sbt scalafmtAll sbt "scalafixAll --check" ``` The focused suite passes all 10 tests. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Codex was used for implementation and verification assistance. I reviewed the final code and test output before submission. -- 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]
