Repository navigation
fix(amber): drain loop side branches before advancing - #9737
aglinxinyuan wants to merge 1 commit into
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9737 +/- ##
============================================
- Coverage 91.77% 91.75% -0.02%
- Complexity 5136 5161 +25
============================================
Files 1308 1308
Lines 58013 58061 +48
Branches 7552 7562 +10
============================================
+ Hits 53240 53273 +33
- Misses 2887 2893 +6
- Partials 1886 1895 +9
*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:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 549 | 0.335 | 17,846/29,590/29,590 us | 🔴 +18.4% / 🔴 +118.1% |
| 🟢 | bs=100 sw=10 sl=64 | 1,237 | 0.755 | 81,635/101,329/101,329 us | 🟢 -5.5% / 🔴 +10.9% |
| 🟢 | bs=1000 sw=10 sl=64 | 1,375 | 0.839 | 702,205/975,720/975,720 us | 🟢 -8.1% / 🟢 -14.3% |
Baseline details
Latest main e8c37e6 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 549 tuples/sec | 629 tuples/sec | 951.49 tuples/sec | -12.7% | -42.3% |
| bs=10 sw=10 sl=64 | MB/s | 0.335 MB/s | 0.384 MB/s | 0.581 MB/s | -12.8% | -42.3% |
| bs=10 sw=10 sl=64 | p50 | 17,846 us | 15,075 us | 10,659 us | +18.4% | +67.4% |
| bs=10 sw=10 sl=64 | p95 | 29,590 us | 25,849 us | 13,570 us | +14.5% | +118.1% |
| bs=10 sw=10 sl=64 | p99 | 29,590 us | 25,849 us | 16,744 us | +14.5% | +76.7% |
| bs=100 sw=10 sl=64 | throughput | 1,237 tuples/sec | 1,200 tuples/sec | 1,256 tuples/sec | +3.1% | -1.5% |
| bs=100 sw=10 sl=64 | MB/s | 0.755 MB/s | 0.733 MB/s | 0.767 MB/s | +3.0% | -1.5% |
| bs=100 sw=10 sl=64 | p50 | 81,635 us | 83,884 us | 84,170 us | -2.7% | -3.0% |
| bs=100 sw=10 sl=64 | p95 | 101,329 us | 107,277 us | 91,401 us | -5.5% | +10.9% |
| bs=100 sw=10 sl=64 | p99 | 101,329 us | 107,277 us | 104,021 us | -5.5% | -2.6% |
| bs=1000 sw=10 sl=64 | throughput | 1,375 tuples/sec | 1,281 tuples/sec | 1,299 tuples/sec | +7.3% | +5.8% |
| bs=1000 sw=10 sl=64 | MB/s | 0.839 MB/s | 0.782 MB/s | 0.793 MB/s | +7.3% | +5.8% |
| bs=1000 sw=10 sl=64 | p50 | 702,205 us | 764,006 us | 819,011 us | -8.1% | -14.3% |
| bs=1000 sw=10 sl=64 | p95 | 975,720 us | 1,007,392 us | 859,723 us | -3.1% | +13.5% |
| bs=1000 sw=10 sl=64 | p99 | 975,720 us | 1,007,392 us | 909,957 us | -3.1% | +7.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,364.28,200,128000,549,0.335,17846.11,29590.37,29590.37
1,100,10,64,20,1616.40,2000,1280000,1237,0.755,81635.28,101329.11,101329.11
2,1000,10,64,20,14548.57,20000,12800000,1375,0.839,702204.83,975719.52,975719.52
What changes were proposed in this PR?
Loop End rewinds the materialized schedule as soon as it requests another iteration. A side sink later in the schedule can miss that iteration. On exit, a downstream consumer can open before the final side write.
Record the repeat request and apply it after the last batch in the loop body finishes. Schedule Loop End’s consumers after the side branches and replay only the regions in the loop. An inner loop finishes its pending repeats before an enclosing loop restarts.
Any related issues, documentation, discussions?
Closes #9736.
How was this PR tested?
The 78 focused tests passed. The native loop suite also passed all 10 tests with
AMBER_TEST_FILTER=integration-only sbt "WorkflowExecutionService/testOnly *LoopIntegrationSpec -- -z exactly".The regression failed on main with one side-sink dispatch across two iterations. With Python workers and Iceberg, the same two-iteration workflow passed at concurrency limits of 1 and 4. In both runs, the side sink wrote turn 1 before the next Loop Start and turn 2 before the downstream consumer opened. The consumer returned both rows.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-6)