Skip to content

feat(amber): reject invalid network batch sizes - #8090

Closed
carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/network-output-batch-size
Closed

carloea2 wants to merge 1 commit into
apache:mainfrom
carloea2:fix/network-output-batch-size

Conversation

@carloea2

@carloea2 carloea2 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

NetworkOutputBuffer now rejects a batch size of zero or less during construction. This prevents invalid workflow settings from silently turning buffered transfer into one message per tuple.

The characterization and pending tests are replaced with one active regression test covering zero and negative values. Existing tests continue to cover valid batch sizes.

Before: A nonpositive batch size was accepted.

After: A nonpositive batch size raises IllegalArgumentException.

This change removes 39 lines overall.

Any related issues, documentation, discussions?

Closes #8089

How was this PR tested?

The active regression test failed before the production change with 16 tests passing and 1 test failing. It passed after the change with all 17 tests passing.

sbt "set DAO / Compile / sourceGenerators := Seq.empty" "WorkflowExecutionService / Test / testOnly org.apache.texera.amber.engine.architecture.sendsemantics.partitioners.NetworkOutputBufferSpec"
sbt "set DAO / Compile / sourceGenerators := Seq.empty" "scalafixAll --check"
sbt scalafmtCheckAll

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex

@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Aug 29, 2026
@github-actions
github-actions Bot requested a review from xuang7 August 29, 2026 05:33
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
✅ release/v1.2 Already labeled — this fix is queued to backport here.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

🟢 0 better · 🔴 0 worse · ⚪ 15 noise (<±5%) · 0 without baseline

Compared against main 2173ec5 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
⚪ bs=10 sw=10 sl=64 394 0.241 24,795/33,313/33,313 us ⚪ within ±5% / 🔴 +113.8%
⚪ bs=100 sw=10 sl=64 788 0.481 125,100/147,961/147,961 us ⚪ within ±5% / 🔴 +38.0%
⚪ bs=1000 sw=10 sl=64 905 0.552 1,097,544/1,197,915/1,197,915 us ⚪ within ±5% / 🔴 +17.1%
Baseline details

Latest main 2173ec5 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 394 tuples/sec 399 tuples/sec 787.98 tuples/sec -1.3% -50.0%
bs=10 sw=10 sl=64 MB/s 0.241 MB/s 0.243 MB/s 0.481 MB/s -0.8% -49.9%
bs=10 sw=10 sl=64 p50 24,795 us 24,628 us 12,593 us +0.7% +96.9%
bs=10 sw=10 sl=64 p95 33,313 us 33,234 us 15,579 us +0.2% +113.8%
bs=10 sw=10 sl=64 p99 33,313 us 33,234 us 18,786 us +0.2% +77.3%
bs=100 sw=10 sl=64 throughput 788 tuples/sec 786 tuples/sec 1,008 tuples/sec +0.3% -21.8%
bs=100 sw=10 sl=64 MB/s 0.481 MB/s 0.48 MB/s 0.615 MB/s +0.2% -21.8%
bs=100 sw=10 sl=64 p50 125,100 us 123,849 us 100,701 us +1.0% +24.2%
bs=100 sw=10 sl=64 p95 147,961 us 149,923 us 107,244 us -1.3% +38.0%
bs=100 sw=10 sl=64 p99 147,961 us 149,923 us 116,122 us -1.3% +27.4%
bs=1000 sw=10 sl=64 throughput 905 tuples/sec 910 tuples/sec 1,042 tuples/sec -0.5% -13.2%
bs=1000 sw=10 sl=64 MB/s 0.552 MB/s 0.555 MB/s 0.636 MB/s -0.5% -13.2%
bs=1000 sw=10 sl=64 p50 1,097,544 us 1,098,094 us 981,959 us -0.1% +11.8%
bs=1000 sw=10 sl=64 p95 1,197,915 us 1,158,591 us 1,023,080 us +3.4% +17.1%
bs=1000 sw=10 sl=64 p99 1,197,915 us 1,158,591 us 1,051,697 us +3.4% +13.9%
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,507.56,200,128000,394,0.241,24795.47,33312.88,33312.88
1,100,10,64,20,2537.26,2000,1280000,788,0.481,125100.49,147960.62,147960.62
2,1000,10,64,20,22101.90,20000,12800000,905,0.552,1097543.70,1197915.40,1197915.40

@codecov-commenter

codecov-commenter commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.98%. Comparing base (2173ec5) to head (27710f8).
⚠️ Report is 189 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8090      +/-   ##
============================================
- Coverage     93.52%   89.98%   -3.54%     
- Complexity     4730     5429     +699     
============================================
  Files          1195     1264      +69     
  Lines         48511    53509    +4998     
  Branches       5379     6051     +672     
============================================
+ Hits          45368    48149    +2781     
- Misses         1695     3782    +2087     
- Partials       1448     1578     +130     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 2173ec5
agent-service 99.32% <ø> (ø) Carriedforward from 2173ec5
amber 82.04% <100.00%> (-7.57%) ⬇️
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 2173ec5
config-service 86.86% <ø> (ø) Carriedforward from 2173ec5
file-service 87.91% <ø> (ø) Carriedforward from 2173ec5
frontend 95.86% <ø> (ø) Carriedforward from 2173ec5
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 2173ec5
pyamber 98.50% <ø> (ø) Carriedforward from 2173ec5
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 2173ec5

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@carloea2
carloea2 force-pushed the fix/network-output-batch-size branch from fa86e6b to 27710f8 Compare August 29, 2026 06:09
@carloea2 carloea2 changed the title fix(amber): reject invalid network batch sizes feat(amber): reject invalid network batch sizes Aug 31, 2026
@mengw15 mengw15 removed the release/v1.2 back porting to release/v1.2 label Aug 31, 2026
@xuang7 xuang7 removed the fix label Sep 1, 2026
@xuang7
xuang7 removed their request for review September 1, 2026 01:47
@carloea2

carloea2 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Closing this small validation change to focus on higher priority work. The linked issue remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nonpositive network batch sizes are accepted

5 participants