Skip to content

refactor(pyamber): drop the discarded credit decode in _send_control - #9609

Open
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:refactor/pyamber-network-sender-credits
Open

Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:refactor/pyamber-network-sender-credits

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • NetworkSender._send_control no longer wraps the control action's reply in an int.from_bytes decode whose result was discarded; it calls the proxy client directly and ignores the reply, as _handshake already does.

Any related issues, documentation, discussions?

Closes: #9606

How was this PR tested?

  • Run: cd amber && pytest src/test/python/core/runnables/test_network_sender.py (expect all green, 5 tests).
  • New test_send_control_invokes_control_action_and_discards_reply stubs call_action and checks _send_control still invokes "control" with the serialized PythonControlMessage and returns None even when the proxy returns a non-empty body.

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

Co-authored with Claude Opus 4.8 in compliance with ASF

NetworkSender._send_control serializes the PythonControlMessage and calls the proxy client's "control" action, which drives the RPC and consumes its single reply. The reply body carries flow-control credits that are currently unused, so the call now discards it directly instead of wrapping it in an int.from_bytes decode whose result was thrown away. This matches how _handshake already ignores the same reply.

test_network_sender adds a positive case for _send_control: it stubs the proxy client's call_action, asserts the method still invokes "control" with the serialized PythonControlMessage, and asserts it returns None even when the proxy hands back a non-empty body.
@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.

@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (9647f58) to head (4f0c040).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9609   +/-   ##
=========================================
  Coverage     91.57%   91.57%           
  Complexity     5182     5182           
=========================================
  Files          1300     1300           
  Lines         58133    58133           
  Branches       7615     7615           
=========================================
  Hits          53236    53236           
  Misses         2959     2959           
  Partials       1938     1938           
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 9647f58
agent-service 99.56% <ø> (ø) Carriedforward from 9647f58
amber 85.45% <ø> (ø) Carriedforward from 9647f58
computing-unit-managing-service 63.88% <ø> (ø) Carriedforward from 9647f58
config-service 87.50% <ø> (ø) Carriedforward from 9647f58
file-service 82.16% <ø> (ø) Carriedforward from 9647f58
frontend 96.46% <ø> (ø) Carriedforward from 9647f58
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 9647f58
pyamber 98.38% <100.00%> (ø)
result-service 85.71% <ø> (ø) Carriedforward from 9647f58
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from 9647f58

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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main f030df1 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 574 0.35 16,801/27,343/27,343 us 🔴 +17.6% / 🔴 +97.3%
🟢 bs=100 sw=10 sl=64 1,272 0.776 78,261/92,528/92,528 us 🟢 -29.1% / 🟢 -13.4%
🔴 bs=1000 sw=10 sl=64 1,483 0.905 666,187/807,056/807,056 us 🔴 +13.2% / 🟢 -14.2%
Baseline details

Latest main f030df1 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 574 tuples/sec 598 tuples/sec 1,019 tuples/sec -4.0% -43.7%
bs=10 sw=10 sl=64 MB/s 0.35 MB/s 0.365 MB/s 0.622 MB/s -4.1% -43.7%
bs=10 sw=10 sl=64 p50 16,801 us 14,290 us 10,136 us +17.6% +65.8%
bs=10 sw=10 sl=64 p95 27,343 us 27,524 us 13,860 us -0.7% +97.3%
bs=10 sw=10 sl=64 p99 27,343 us 27,524 us 16,484 us -0.7% +65.9%
bs=100 sw=10 sl=64 throughput 1,272 tuples/sec 1,172 tuples/sec 1,363 tuples/sec +8.5% -6.7%
bs=100 sw=10 sl=64 MB/s 0.776 MB/s 0.715 MB/s 0.832 MB/s +8.5% -6.7%
bs=100 sw=10 sl=64 p50 78,261 us 78,971 us 79,194 us -0.9% -1.2%
bs=100 sw=10 sl=64 p95 92,528 us 130,540 us 87,022 us -29.1% +6.3%
bs=100 sw=10 sl=64 p99 92,528 us 130,540 us 106,894 us -29.1% -13.4%
bs=1000 sw=10 sl=64 throughput 1,483 tuples/sec 1,465 tuples/sec 1,407 tuples/sec +1.2% +5.4%
bs=1000 sw=10 sl=64 MB/s 0.905 MB/s 0.894 MB/s 0.859 MB/s +1.2% +5.4%
bs=1000 sw=10 sl=64 p50 666,187 us 685,892 us 776,422 us -2.9% -14.2%
bs=1000 sw=10 sl=64 p95 807,056 us 713,152 us 814,091 us +13.2% -0.9%
bs=1000 sw=10 sl=64 p99 807,056 us 713,152 us 860,577 us +13.2% -6.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,348.47,200,128000,574,0.350,16800.82,27343.12,27343.12
1,100,10,64,20,1572.42,2000,1280000,1272,0.776,78261.10,92528.15,92528.15
2,1000,10,64,20,13484.43,20000,12800000,1483,0.905,666187.39,807055.80,807055.80

This branch has not been deployed

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

Labels

pyamber refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop discarded credit decode in NetworkSender._send_control

2 participants