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

   ### What changes were proposed in this PR?
   
   Removes the adaptive-batching pause/resume pair from `WorkerTimerService`, 
which can no longer do anything. **+7/−106 lines.** There is no behaviour 
change.
   
   - **`WorkerTimerService.scala`:** `pauseAdaptiveBatching()`, 
`resumeAdaptiveBatching()`, and the `isPaused` flag (with its reset in 
`stopAdaptiveBatching`). `isPaused` could only be set by 
`pauseAdaptiveBatching()`, which has no production caller, so 
`resumeAdaptiveBatching()` has never re-armed the timer since then.
   - **`ResumeHandler.scala`:** the no-op `resumeAdaptiveBatching()` call. The 
rest of the handler is unchanged. Pause and resume leave the flush timer alone, 
both before and after this PR.
   - **Specs:** `WorkerTimerServiceSpec` loses the four cases that only 
exercised the removed methods. Its start/stop cases drop their `isPaused` 
asserts, and one stop case that called pause now stops twice instead, keeping 
its repeated-cancel assertion. `DPThreadSpec` drops eight 
`resumeAdaptiveBatching` mock expectations.
   
   `PauseManager.isPaused`, a different and live member, is untouched.
   
   ### History
   
   | | |
   | --- | --- |
   | **Introduced by** | #1826 (2023-02-02), "Add time-based batch in network 
output buffer": the pause method. #2208 (2023-11-16), "Refactoring of amber 
engine", moved it into `WorkerTimerService` and added `isPaused`, 
`resumeAdaptiveBatching()` and the `ResumeHandler` call |
   | **Usage removed by** | #2392 (2024-02-19), "Remove breakpoint feature". It 
deleted the last `pauseAdaptiveBatching()` caller, the breakpoint branch in 
`DataProcessor` |
   
   It has done nothing for over two and a half years.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9026
   
   ### How was this PR tested?
   
   No new tests. The surviving start/stop behaviour keeps its cases.
   
   Locally, from the repo root with Java 17:
   
   - `sbt "WorkflowExecutionService/Test/compile" 
"WorkflowExecutionService/scalafmtCheckAll" 
"WorkflowExecutionService/scalafixAll --check"`: success.
   - `sbt "WorkflowExecutionService/testOnly *WorkerTimerServiceSpec 
*DPThreadSpec *DataProcessorSpec *WorkerSpec *LoggingSpec 
*CoordinatorTimerServiceSpec"`: 6 suites, 53 tests, all pass.
   - `sbt "WorkflowExecutionService/testOnly *e2e.PauseSpec"`, which runs a 
real pause/resume through `ResumeHandler`: 2 tests, both pass.
   
   To re-check:
   
   ```
   git grep -n -e pauseAdaptiveBatching -e resumeAdaptiveBatching   # no hits
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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