Skip to content

refactor(pyamber): drop dead AtomicInteger value setter - #9189

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/pyamber-dead-atomic-setter
Oct 27, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
aglinxinyuan:refactor/pyamber-dead-atomic-setter

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes the unused @value.setter on AtomicInteger in amber/src/main/python/core/util/atomic.py:48-52. Callers across the engine mutate the atomic value strictly via atomic methods (inc, dec, get_and_inc, get_and_dec, get_and_set) and read via the property getter (.value), leaving the setter unused. The corresponding unit test in test_atomic.py is updated to verify value is a read-only property (AttributeError on assignment).

+3/-11 lines. Pure deletion of dead setter and regression test update.

Any related issues, documentation, discussions?

Closes #9188.

How was this PR tested?

  • python -m py_compile amber/src/main/python/core/util/atomic.py
  • python -m pytest amber/src/test/python/core/util/test_atomic.py (11 passed)
  • Verified 0 callers repo-wide:
    git grep -nw "AtomicInteger" | grep -v test shows only .inc(), .dec(), .get_and_inc(), .get_and_dec(), .get_and_set(), .value (getter).

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

Generated-by: Antigravity (Claude Opus 5.5)

@aglinxinyuan aglinxinyuan added pyamber refactor Refactor the code labels Oct 27, 2026
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:28
@aglinxinyuan aglinxinyuan self-assigned this Oct 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@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: @nathant27, @mengw15
    You can notify them by mentioning @nathant27, @mengw15 in a comment.

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 October 27, 2026 21:37

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kunwp1
kunwp1 enabled auto-merge October 27, 2026 21:43
@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.96%. Comparing base (6659eec) to head (0448e95).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9189      +/-   ##
============================================
- Coverage     91.98%   91.96%   -0.02%     
+ Complexity     5084     5083       -1     
============================================
  Files          1281     1281              
  Lines         55812    55712     -100     
  Branches       7076     7067       -9     
============================================
- Hits          51337    51238      -99     
+ Misses         2734     2731       -3     
- Partials       1741     1743       +2     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 0f1df22
agent-service 99.16% <ø> (ø) Carriedforward from 0f1df22
amber 86.36% <ø> (-0.08%) ⬇️ Carriedforward from 0f1df22
computing-unit-managing-service 63.52% <ø> (ø) Carriedforward from 0f1df22
config-service 87.50% <ø> (ø) Carriedforward from 0f1df22
file-service 82.29% <ø> (ø) Carriedforward from 0f1df22
frontend 96.53% <ø> (-0.01%) ⬇️ Carriedforward from 0f1df22
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 0f1df22
pyamber 98.54% <ø> (+0.06%) ⬆️
workflow-compiling-service 74.25% <ø> (ø) Carriedforward from 0f1df22

*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

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 6659eec 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 559 0.341 17,758/21,994/21,994 us 🔴 +10.7% / 🔴 +61.6%
🔴 bs=100 sw=10 sl=64 1,195 0.73 83,079/97,495/97,495 us 🔴 +11.6% / 🟢 -12.3%
⚪ bs=1000 sw=10 sl=64 1,404 0.857 707,731/771,993/771,993 us ⚪ within ±5% / 🟢 -15.9%
Baseline details

Latest main 6659eec from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 559 tuples/sec 620 tuples/sec 941.58 tuples/sec -9.8% -40.6%
bs=10 sw=10 sl=64 MB/s 0.341 MB/s 0.378 MB/s 0.575 MB/s -9.8% -40.7%
bs=10 sw=10 sl=64 p50 17,758 us 16,041 us 10,991 us +10.7% +61.6%
bs=10 sw=10 sl=64 p95 21,994 us 22,842 us 13,776 us -3.7% +59.7%
bs=10 sw=10 sl=64 p99 21,994 us 22,842 us 16,872 us -3.7% +30.4%
bs=100 sw=10 sl=64 throughput 1,195 tuples/sec 1,313 tuples/sec 1,264 tuples/sec -9.0% -5.5%
bs=100 sw=10 sl=64 MB/s 0.73 MB/s 0.801 MB/s 0.772 MB/s -8.9% -5.4%
bs=100 sw=10 sl=64 p50 83,079 us 74,449 us 86,073 us +11.6% -3.5%
bs=100 sw=10 sl=64 p95 97,495 us 99,073 us 93,135 us -1.6% +4.7%
bs=100 sw=10 sl=64 p99 97,495 us 99,073 us 111,124 us -1.6% -12.3%
bs=1000 sw=10 sl=64 throughput 1,404 tuples/sec 1,423 tuples/sec 1,304 tuples/sec -1.3% +7.6%
bs=1000 sw=10 sl=64 MB/s 0.857 MB/s 0.869 MB/s 0.796 MB/s -1.4% +7.7%
bs=1000 sw=10 sl=64 p50 707,731 us 705,462 us 841,986 us +0.3% -15.9%
bs=1000 sw=10 sl=64 p95 771,993 us 736,705 us 881,107 us +4.8% -12.4%
bs=1000 sw=10 sl=64 p99 771,993 us 736,705 us 918,208 us +4.8% -15.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,357.95,200,128000,559,0.341,17758.24,21994.45,21994.45
1,100,10,64,20,1673.23,2000,1280000,1195,0.730,83078.88,97495.42,97495.42
2,1000,10,64,20,14247.39,20000,12800000,1404,0.857,707731.23,771993.16,771993.16

@aglinxinyuan
aglinxinyuan disabled auto-merge October 27, 2026 22:34
@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Oct 27, 2026
Merged via the queue into apache:main with commit c57e6b0 Oct 27, 2026
24 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/pyamber-dead-atomic-setter branch October 27, 2026 23:10
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.

Remove unused AtomicInteger value setter from pyamber

4 participants