Repository navigation
refactor(amber): remove the no-op batching pause/resume - #9029
Open
aglinxinyuan wants to merge 2 commits into
Open
aglinxinyuan wants to merge 2 commits into
aglinxinyuan wants to merge 2 commits into
Conversation
WorkerTimerService.isPaused is only set by pauseAdaptiveBatching(), whose last caller apache#2392 removed, so resumeAdaptiveBatching() and its call in the worker ResumeHandler have done nothing since. Remove the pair, the flag and the call; start/stop are unchanged.
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
No open issues 🎉
Review effort: Lite
kunwp1
approved these changes
Oct 20, 2026
Copilot stopped reviewing on behalf of
kunwp1 due to an error
October 20, 2026 20:18
aglinxinyuan
enabled auto-merge
October 21, 2026 03:21
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theisPausedflag (with its reset instopAdaptiveBatching).isPausedcould only be set bypauseAdaptiveBatching(), which has no production caller, soresumeAdaptiveBatching()has never re-armed the timer since then.ResumeHandler.scala: the no-opresumeAdaptiveBatching()call. The rest of the handler is unchanged. Pause and resume leave the flush timer alone, both before and after this PR.WorkerTimerServiceSpecloses the four cases that only exercised the removed methods. Its start/stop cases drop theirisPausedasserts, and one stop case that called pause now stops twice instead, keeping its repeated-cancel assertion.DPThreadSpecdrops eightresumeAdaptiveBatchingmock expectations.PauseManager.isPaused, a different and live member, is untouched.History
WorkerTimerServiceand addedisPaused,resumeAdaptiveBatching()and theResumeHandlercallpauseAdaptiveBatching()caller, the breakpoint branch inDataProcessorIt 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 throughResumeHandler: 2 tests, both pass.To re-check:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with Claude Code