refactor(amber): collapse the single-subclass ReplayLogger hierarchy into one class - #7674
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 351 | 0.214 | 29,782/38,923/38,923 us | 🔴 +25.8% / 🔴 +140.7% |
| 🔴 | bs=100 sw=10 sl=64 | 820 | 0.501 | 119,104/164,217/164,217 us | 🔴 +9.2% / 🔴 +55.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 939 | 0.573 | 1,061,431/1,137,708/1,137,708 us | ⚪ within ±5% / 🔴 +12.4% |
Baseline details
Latest main 1011ff7 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 351 tuples/sec | 406 tuples/sec | 784.16 tuples/sec | -13.5% | -55.2% |
| bs=10 sw=10 sl=64 | MB/s | 0.214 MB/s | 0.248 MB/s | 0.479 MB/s | -13.7% | -55.3% |
| bs=10 sw=10 sl=64 | p50 | 29,782 us | 23,675 us | 12,626 us | +25.8% | +135.9% |
| bs=10 sw=10 sl=64 | p95 | 38,923 us | 39,242 us | 16,169 us | -0.8% | +140.7% |
| bs=10 sw=10 sl=64 | p99 | 38,923 us | 39,242 us | 18,986 us | -0.8% | +105.0% |
| bs=100 sw=10 sl=64 | throughput | 820 tuples/sec | 838 tuples/sec | 1,023 tuples/sec | -2.1% | -19.9% |
| bs=100 sw=10 sl=64 | MB/s | 0.501 MB/s | 0.511 MB/s | 0.625 MB/s | -2.0% | -19.8% |
| bs=100 sw=10 sl=64 | p50 | 119,104 us | 114,695 us | 99,185 us | +3.8% | +20.1% |
| bs=100 sw=10 sl=64 | p95 | 164,217 us | 150,442 us | 105,616 us | +9.2% | +55.5% |
| bs=100 sw=10 sl=64 | p99 | 164,217 us | 150,442 us | 113,681 us | +9.2% | +44.5% |
| bs=1000 sw=10 sl=64 | throughput | 939 tuples/sec | 944 tuples/sec | 1,057 tuples/sec | -0.5% | -11.1% |
| bs=1000 sw=10 sl=64 | MB/s | 0.573 MB/s | 0.576 MB/s | 0.645 MB/s | -0.5% | -11.2% |
| bs=1000 sw=10 sl=64 | p50 | 1,061,431 us | 1,056,327 us | 965,435 us | +0.5% | +9.9% |
| bs=1000 sw=10 sl=64 | p95 | 1,137,708 us | 1,120,087 us | 1,012,135 us | +1.6% | +12.4% |
| bs=1000 sw=10 sl=64 | p99 | 1,137,708 us | 1,120,087 us | 1,042,088 us | +1.6% | +9.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,570.00,200,128000,351,0.214,29782.37,38922.54,38922.54
1,100,10,64,20,2438.33,2000,1280000,820,0.501,119103.75,164216.62,164216.62
2,1000,10,64,20,21291.82,20000,12800000,939,0.573,1061430.68,1137708.26,1137708.26
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7674 +/- ##
============================================
+ Coverage 90.93% 90.95% +0.01%
- Complexity 4452 4455 +3
============================================
Files 1175 1174 -1
Lines 47140 47139 -1
Branches 5284 5284
============================================
+ Hits 42869 42873 +4
+ Misses 2581 2580 -1
+ Partials 1690 1686 -4
*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:
|
### What changes were proposed in this PR? CI has been red repo-wide since 2026-08-16 ~02:00 UTC — `main`, the merge queue, and every PR that runs a Scala stack. The jobs die in 3–7s during *Prepare all required actions*, before checkout, so they produce no test output at all. The cause is the ASF actions allowlist, not anything in this repository. `sbt/setup-sbt` reaches a nested `carabiner-dev` action that is no longer permitted: ``` .github/workflows/*.yml └─ sbt/setup-sbt@6444f4c v1.5.2 allowed └─ carabiner-dev/actions@94f2939 v1.2.1 allowed └─ carabiner-dev/actions@2a11d59 v1.1.7 BLOCKED ``` > The action carabiner-dev/actions@2a11d59 is not allowed in apache/texera because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns: … Nothing in the tree changed — every link in that chain is SHA-pinned, and the `sbt/setup-sbt` pin last moved in apache#6710 on 2026-07-22. The same `2a11d59` downloaded successfully at `2026-08-15T02:01Z` (apache#7674's amber job) and is rejected at `2026-08-17T02:13Z`. Last clean run before the break: merge-queue `pr-7699` at `2026-08-16T01:52:00Z`; first failure: `main` at `2026-08-16T02:04:42Z`. This bumps all 9 call sites from v1.5.2 to v1.5.7, which resolves down a different path: | | v1.5.2 (current) | v1.5.7 (this PR) | | --- | --- | --- | | `ampel/verify` | `94f2939` (v1.2.1) | `36a39ef` (v1.2.6) | | `install/ampel` | **`2a11d59` — blocked** | `2fec8bd8` | | `install/bnd` | `2a11d59` | no longer referenced | Call sites: `benchmarks.yml` (1), `build-and-push-images.yml` (3), `build.yml` (4), `dependency-graph.yml` (1). > Reviewer note — one thing I could not verify up front. The org allowlist is not readable without repo-admin (`403`), and the error message truncates the pattern list before the `carabiner-dev` entries, so I could not confirm in advance that `2fec8bd8` is permitted. **This PR's own CI run is the experiment.** If it fails on the same error, the bump is a dead end and the fallback is an INFRA request to re-allow `carabiner-dev/actions@2a11d59a135c5e291f305f249a92ad7903e3ee0f`. ### Any related issues, documentation, discussions? No issue filed — the regression originates outside the repository and this PR is the unblock. The previous bump of this pin was apache#6710. ### How was this PR tested? By this PR's CI, which is the only place the failure reproduces — it depends on the `apache/texera` actions policy and cannot be triggered locally or on a fork. The change touches `.github/**`, so the labeler applies `ci`, and `ci` maps to every stack in `LABEL_STACKS` (`.github/workflows/precheck.yml`) — `frontend`, `amber`, `amber-integration`, `platform`, `platform-integration`, `pyamber`, `agent-service`, `infra`, `pyright-language-service` — plus `Bench`. Every job that consumes `sbt/setup-sbt` is therefore exercised here. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5)
Yicong-Huang
left a comment
There was a problem hiding this comment.
🟡 0 must-fix · 2 advisory · 1 polish — the hierarchy collapse is behaviorally safe, with two recommendations and one documentation touch-up.
Design & architecture (1)
ReplayLoggerImpl.scala:31— rename the remaining concrete type toReplayLoggerto complete the collapse (advisory, see inline)
Conventions (1)
- Description: remove the stale statement that #7452 still needs to merge, and rebase the stacked branch (advisory)
Polish: 1 quick touch-up (see inline comments).
…into one class After EmptyReplayLogger was removed, the abstract base ReplayLogger had one subclass and was never named as a type: ReplayLogManagerImpl builds it as `new ReplayLoggerImpl()`, so the inferred type is the concrete class. Merges the two into a single `class ReplayLogger` in ReplayLogger.scala, dropping `extends ReplayLogger` and the now-meaningless `override`. The Impl suffix goes with the base -- it advertised an interface that no longer exists. The three method bodies are untouched; no behaviour change. Also fixes a stale `@param channel` in the Scaladoc; the parameter has been called channelId all along.
a76889e to
d844b3b
Compare
|
Thanks @Yicong-Huang — all three addressed, force-pushed as d844b3b.
The description is rewritten around the new naming rather than the old "keeps its name" argument, since your point stands: with the base deleted there is no abstraction for Re-verified locally from the repo root on Java 17:
|
What changes were proposed in this PR?
Collapses the two-file
ReplayLoggerhierarchy into one concrete class. #7452 removedEmptyReplayLogger, which left the abstract base with a single subclass and no declared-type site anywhere:ReplayLoggerEmptyReplayLoggerSpec.scala:125, itself deleted by #7452maintodaySo the base declared three abstract methods that exactly one class implemented and that no call site dispatched through. Dropping it removes
extends ReplayLogger, oneoverridekeyword that no longer overrides anything, and one of the two files. The three method bodies move across untouched — no behaviour change.Naming. The surviving class takes the plain
ReplayLoggername. With the base gone there is no abstraction left for an...Implsuffix to distinguish it from, and the suffix would advertise an interface that no longer exists.ReplayLogManagerImplis unaffected — it does sit beside a realReplayLogManagertrait in the same package.The rename touches one production call site (
ReplayLogManager.scala:109) and thenew ReplayLoggerImpl()constructions plus test names inLogreplayPrimitivesSpec. It also fixes a stale@param channelin the Scaladoc, whose parameter has been calledchannelIdall along.Any related issues, documentation, discussions?
Closes #7673
How was this PR tested?
Existing tests only — this is a structural change with no behaviour change, and
LogreplayPrimitivesSpecalready covers the class by constructing it directly, so it pins all three methods across the refactor. Its only edits are the type name.Locally, from the repo root with Java 17:
sbt "WorkflowExecutionService/Test/compile"— success.sbt "WorkflowExecutionService/testOnly *LogreplayPrimitivesSpec *EmptyReplayLogManagerImplSpec *ReplayLogGeneratorSpec"— all green.sbt scalafmtCheckAll "scalafixAll --check"— clean.Verification, re-runnable by a reviewer:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)