aglinxinyuan opened a new pull request, #4836:
URL: https://github.com/apache/texera/pull/4836

   ### What changes were proposed in this PR?
   
   Add `WorkerManagersSpec` covering the three worker-side state managers under 
`amber/.../worker` and `amber/.../worker/managers`.
   
   `StatisticsManager`:
   - Defaults all counters to zero
   - Per-port input/output count + size accumulation
   - Negative tuple sizes rejected on both input and output paths
   - Processing-time accumulation (data and control), with negative rejection
   - `idleTime = totalExecutionTime - dataProcessingTime - 
controlProcessingTime`
   - `updateTotalExecutionTime` rejects current time before `workerStartTime`
   
   `SerializationManager`:
   - `applySerialization` is a no-op when no callback is registered
   - Registered callback fires exactly once and is then cleared
   - Latest registered callback overwrites any previous one
   
   `PauseManager` (with a stub `InputGateway` and three real `AmberFIFOChannel` 
instances):
   - `isPaused` is false initially
   - Global `pause` disables every data channel (control channels left alone) 
and reports paused
   - `resume` re-enables all data channels when no specific-input pauses remain
   - Stays paused when other global pauses are still active
   - `pauseInputChannel` disables only the listed channels
   - One specific-pause resume leaves still-paused channels disabled
   
   `EmbeddedControlMessageManager` is intentionally skipped because it requires 
the full `InputManager` + ECM infrastructure and is best exercised by an 
integration test.
   
   ### Any related issues, documentation, discussions?
   
   Closes #4835
   
   ### How was this PR tested?
   
   `sbt "WorkflowExecutionService/testOnly 
org.apache.texera.amber.engine.architecture.worker.managers.WorkerManagersSpec"`
 - 18/18 tests pass.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)


-- 
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]

Reply via email to