Skip to content

refactor(amber): remove the write-only AmberConfig - #9028

Merged
aglinxinyuan merged 3 commits into
apache:mainfrom
aglinxinyuan:refactor/amber-config-master-addr
Oct 24, 2026
Merged

aglinxinyuan merged 3 commits into
apache:mainfrom
aglinxinyuan:refactor/amber-config-master-addr

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes the AmberConfig object, whose only member, masterNodeAddr, is written but never read. +8/−57 lines. There is no behaviour change.

  • AmberConfig.scala: deleted.
  • AmberRuntime.scala: the two AmberConfig.masterNodeAddr = createMasterAddress(...) writes in startActorMaster / startActorWorker, the private createMasterAddress helper that only fed them, and the Address import. The seed nodes, hostname and actor system the two methods build are unchanged.
  • ScheduleGenerator.scala: a ScalaDoc line cited AmberConfig.maxConcurrentRegions; the value lives in ApplicationConfig.
  • AmberRuntimeSpec: drops the save/restore of the global, the sentinel, and the one case that only observed masterNodeAddr. Every case covering the surviving AmberRuntime behaviour stays.

History

Introduced by #811 (2020-08-22), "Merge Amber master into texera master": masterNodeAddr, for ClusterListener to tell the master node apart. #1439 (2022-02-12) added createMasterAddress, and #2245 (2023-12-06) moved the field into AmberConfig
Usage removed by #3029 (2024-12-08), "Create a separate web server for workflow execution". It deleted the last reader, member.address != AmberConfig.masterNodeAddr in ClusterListener. #3466 (2025-06-13) then moved every other AmberConfig member to common/config, leaving only this field

It has been write-only for nearly two years.

Any related issues, documentation, discussions?

Closes #9025

How was this PR tested?

No new tests. AmberRuntimeSpec keeps its coverage of the master and worker startup paths.

Locally, from the repo root with Java 17:

  • sbt "WorkflowExecutionService/Test/compile" "WorkflowExecutionService/scalafmtCheckAll" "WorkflowExecutionService/scalafixAll --check": success.
  • sbt "WorkflowExecutionService/testOnly *AmberRuntimeSpec *ComputingUnitMasterSpec *ClusterListenerSpec *CostBasedScheduleGeneratorSpec": 4 suites, 68 tests, all pass.

To re-check:

git grep -n -w -e AmberConfig -e masterNodeAddr -e createMasterAddress -- amber   # no hits

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

AmberConfig's only member, masterNodeAddr, is written by
AmberRuntime.startActorMaster/startActorWorker but has had no reader
since apache#3029 removed the ClusterListener check. Delete the object, the
two writes and the createMasterAddress helper that fed them, and fix
the ScheduleGenerator ScalaDoc that still cited
AmberConfig.maxConcurrentRegions.
Copilot AI balanced review requested due to automatic review settings October 19, 2026 07:07
@aglinxinyuan aglinxinyuan self-assigned this Oct 19, 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 reached their quota limit.

@github-actions github-actions Bot added engine refactor Refactor the code labels Oct 19, 2026
@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: @Ma77Ball
    You can notify them by mentioning @Ma77Ball in a comment.

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 October 19, 2026 21:06
@kunwp1
kunwp1 requested a lite review from Copilot October 20, 2026 17:38

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.

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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 6cfcfb1 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 535 0.326 18,154/22,396/22,396 us 🔴 +21.3% / 🔴 +70.5%
⚪ bs=100 sw=10 sl=64 1,257 0.767 78,863/95,070/95,070 us ⚪ within ±5% / 🟢 -12.4%
⚪ bs=1000 sw=10 sl=64 1,485 0.907 671,571/751,032/751,032 us ⚪ within ±5% / 🟢 -17.2%
Baseline details

Latest main 6cfcfb1 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 535 tuples/sec 619 tuples/sec 968.33 tuples/sec -13.6% -44.8%
bs=10 sw=10 sl=64 MB/s 0.326 MB/s 0.378 MB/s 0.591 MB/s -13.8% -44.8%
bs=10 sw=10 sl=64 p50 18,154 us 14,966 us 10,646 us +21.3% +70.5%
bs=10 sw=10 sl=64 p95 22,396 us 23,708 us 14,120 us -5.5% +58.6%
bs=10 sw=10 sl=64 p99 22,396 us 23,708 us 16,498 us -5.5% +35.8%
bs=100 sw=10 sl=64 throughput 1,257 tuples/sec 1,272 tuples/sec 1,252 tuples/sec -1.2% +0.4%
bs=100 sw=10 sl=64 MB/s 0.767 MB/s 0.777 MB/s 0.764 MB/s -1.3% +0.4%
bs=100 sw=10 sl=64 p50 78,863 us 77,398 us 83,736 us +1.9% -5.8%
bs=100 sw=10 sl=64 p95 95,070 us 91,367 us 92,464 us +4.1% +2.8%
bs=100 sw=10 sl=64 p99 95,070 us 91,367 us 108,561 us +4.1% -12.4%
bs=1000 sw=10 sl=64 throughput 1,485 tuples/sec 1,474 tuples/sec 1,321 tuples/sec +0.7% +12.4%
bs=1000 sw=10 sl=64 MB/s 0.907 MB/s 0.9 MB/s 0.806 MB/s +0.8% +12.5%
bs=1000 sw=10 sl=64 p50 671,571 us 682,555 us 811,260 us -1.6% -17.2%
bs=1000 sw=10 sl=64 p95 751,032 us 756,671 us 847,636 us -0.7% -11.4%
bs=1000 sw=10 sl=64 p99 751,032 us 756,671 us 879,277 us -0.7% -14.6%
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,374.15,200,128000,535,0.326,18154.14,22395.76,22395.76
1,100,10,64,20,1591.46,2000,1280000,1257,0.767,78862.78,95069.66,95069.66
2,1000,10,64,20,13465.45,20000,12800000,1485,0.907,671570.53,751031.79,751031.79

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Oct 24, 2026
Merged via the queue into apache:main with commit 0e6fbf4 Oct 24, 2026
22 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/amber-config-master-addr branch October 24, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the write-only AmberConfig object

3 participants