Repository navigation
refactor(amber): remove the no-op batching pause/resume - #9029
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.
Automated Reviewer SuggestionsBased on the
|
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
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 557 | 0.34 | 17,653/24,928/24,928 us | 🔴 +19.1% / 🔴 +76.5% |
| 🔴 | bs=100 sw=10 sl=64 | 1,582 | 0.966 | 59,431/93,392/93,392 us | 🔴 +6.0% / 🟢 -29.0% |
| ⚪ | bs=1000 sw=10 sl=64 | 2,000 | 1.221 | 492,489/595,923/595,923 us | ⚪ within ±5% / 🟢 +51.5% |
Baseline details
Latest main 6cfcfb1 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 557 tuples/sec | 606 tuples/sec | 968.33 tuples/sec | -8.1% | -42.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.34 MB/s | 0.37 MB/s | 0.591 MB/s | -8.1% | -42.5% |
| bs=10 sw=10 sl=64 | p50 | 17,653 us | 14,827 us | 10,646 us | +19.1% | +65.8% |
| bs=10 sw=10 sl=64 | p95 | 24,928 us | 26,346 us | 14,120 us | -5.4% | +76.5% |
| bs=10 sw=10 sl=64 | p99 | 24,928 us | 26,346 us | 16,498 us | -5.4% | +51.1% |
| bs=100 sw=10 sl=64 | throughput | 1,582 tuples/sec | 1,530 tuples/sec | 1,252 tuples/sec | +3.4% | +26.3% |
| bs=100 sw=10 sl=64 | MB/s | 0.966 MB/s | 0.934 MB/s | 0.764 MB/s | +3.4% | +26.4% |
| bs=100 sw=10 sl=64 | p50 | 59,431 us | 61,863 us | 83,736 us | -3.9% | -29.0% |
| bs=100 sw=10 sl=64 | p95 | 93,392 us | 88,103 us | 92,464 us | +6.0% | +1.0% |
| bs=100 sw=10 sl=64 | p99 | 93,392 us | 88,103 us | 108,561 us | +6.0% | -14.0% |
| bs=1000 sw=10 sl=64 | throughput | 2,000 tuples/sec | 1,970 tuples/sec | 1,321 tuples/sec | +1.5% | +51.4% |
| bs=1000 sw=10 sl=64 | MB/s | 1.221 MB/s | 1.203 MB/s | 0.806 MB/s | +1.5% | +51.5% |
| bs=1000 sw=10 sl=64 | p50 | 492,489 us | 497,544 us | 811,260 us | -1.0% | -39.3% |
| bs=1000 sw=10 sl=64 | p95 | 595,923 us | 617,276 us | 847,636 us | -3.5% | -29.7% |
| bs=1000 sw=10 sl=64 | p99 | 595,923 us | 617,276 us | 879,277 us | -3.5% | -32.2% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,359.27,200,128000,557,0.340,17653.43,24927.89,24927.89
1,100,10,64,20,1263.95,2000,1280000,1582,0.966,59430.61,93392.39,93392.39
2,1000,10,64,20,9999.32,20000,12800000,2000,1.221,492488.54,595922.96,595922.96
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9029 +/- ##
============================================
- Coverage 92.34% 92.33% -0.01%
+ Complexity 5046 5041 -5
============================================
Files 1261 1261
Lines 54117 54110 -7
Branches 6767 6767
============================================
- Hits 49973 49964 -9
- Misses 2485 2486 +1
- Partials 1659 1660 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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