Repository navigation
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 748 | 0.457 | 12,064/24,226/24,226 us | 🔴 -9.1% / 🔴 +80.9% |
| 🟢 | bs=100 sw=10 sl=64 | 1,892 | 1.155 | 52,726/57,516/57,516 us | 🟢 -33.0% / 🟢 +42.6% |
| ⚪ | bs=1000 sw=10 sl=64 | 2,146 | 1.31 | 463,676/520,940/520,940 us | ⚪ within ±5% / 🟢 +57.5% |
Baseline details
Latest main 8c8cdc8 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 748 tuples/sec | 823 tuples/sec | 993.83 tuples/sec | -9.1% | -24.7% |
| bs=10 sw=10 sl=64 | MB/s | 0.457 MB/s | 0.503 MB/s | 0.607 MB/s | -9.1% | -24.7% |
| bs=10 sw=10 sl=64 | p50 | 12,064 us | 11,895 us | 10,119 us | +1.4% | +19.2% |
| bs=10 sw=10 sl=64 | p95 | 24,226 us | 23,870 us | 13,394 us | +1.5% | +80.9% |
| bs=10 sw=10 sl=64 | p99 | 24,226 us | 23,870 us | 16,114 us | +1.5% | +50.3% |
| bs=100 sw=10 sl=64 | throughput | 1,892 tuples/sec | 1,869 tuples/sec | 1,327 tuples/sec | +1.2% | +42.6% |
| bs=100 sw=10 sl=64 | MB/s | 1.155 MB/s | 1.14 MB/s | 0.81 MB/s | +1.3% | +42.6% |
| bs=100 sw=10 sl=64 | p50 | 52,726 us | 52,508 us | 79,097 us | +0.4% | -33.3% |
| bs=100 sw=10 sl=64 | p95 | 57,516 us | 85,830 us | 86,335 us | -33.0% | -33.4% |
| bs=100 sw=10 sl=64 | p99 | 57,516 us | 85,830 us | 94,338 us | -33.0% | -39.0% |
| bs=1000 sw=10 sl=64 | throughput | 2,146 tuples/sec | 2,156 tuples/sec | 1,363 tuples/sec | -0.5% | +57.5% |
| bs=1000 sw=10 sl=64 | MB/s | 1.31 MB/s | 1.316 MB/s | 0.832 MB/s | -0.5% | +57.5% |
| bs=1000 sw=10 sl=64 | p50 | 463,676 us | 464,018 us | 774,633 us | -0.1% | -40.1% |
| bs=1000 sw=10 sl=64 | p95 | 520,940 us | 500,350 us | 814,584 us | +4.1% | -36.0% |
| bs=1000 sw=10 sl=64 | p99 | 520,940 us | 500,350 us | 858,914 us | +4.1% | -39.3% |
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,267.36,200,128000,748,0.457,12064.01,24225.80,24225.80
1,100,10,64,20,1057.19,2000,1280000,1892,1.155,52725.77,57515.63,57515.63
2,1000,10,64,20,9318.05,20000,12800000,2146,1.310,463675.78,520940.38,520940.38
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9628 +/- ##
============================================
- Coverage 91.67% 91.67% -0.01%
- Complexity 5135 5144 +9
============================================
Files 1304 1304
Lines 58093 58106 +13
Branches 7582 7588 +6
============================================
+ Hits 53258 53268 +10
- Misses 2923 2927 +4
+ Partials 1912 1911 -1
*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:
|
|
Removing |
|
/request-review @bobbai00 |
bobbai00
left a comment
There was a problem hiding this comment.
🟡 0 must-fix · 2 advisory · 1 polish: the core fix is correct; the notes cover when killed and failed runs commit, plus two small follow-ups.
Design & architecture (1)
ExecutionStatsService.scala:224: failed and killed runs commit only at a later teardown (advisory, see inline)
Conventions (1)
ExecutionStatsService.scala:242: the deferredExecutionConsoleServicefix has no tracking issue (advisory, see inline)
Polish: 1 quick touch-up (see inline comments).
Verification trace
Traced the ordering. The persist callbacks and the terminal-state callback both run on the client actor thread (AmberClient.scala:116-144), and the close is submitted to the same single-thread executor as the writes, so it runs after every snapshot queued before the terminal state, and IcebergTableWriter (documented as not thread-safe) is now used from one thread only. A second terminal state, or a teardown after one, is a no-op through the CAS, and the writes rejected after the shutdown were never committed on the base either.
A fatal error ends a run without a terminal state, and the stats service is only torn down at the next run or on session cleanup, so a failed run's statistics stayed unreadable until then. Commit them from the FatalError callback. The teardown commit no longer waits for the close, so starting the next run after a kill is not held up by it. Drop the stale note in WorkflowExecutionServiceSpec about the persist executor leaking, and fold the two no-terminal-state tests into one.
|
@bobbai00 I addressed all your comments! Can you have one more pass? Thanks. |
bobbai00
left a comment
There was a problem hiding this comment.
🟢 3 resolved · 0 open · 2 new (2 new = 2 newly introduced · 0 late catches)
All three round-1 notes are fixed in the tree; two comments added in this round need a wording touch.
Polish: 2 quick touch-ups (see inline comments).
Take the reviewer's wording for the teardown and fatal-error comments: the background commit is there so the next run does not wait, and a fatal error lacks the engine's terminal state rather than a terminal state. Rename the matching test the same way. Catch every close failure inside the commit task with ErrorUtils.safely, so a failed close is always logged and never escapes commit.get. Name the task as a Runnable, log "Committing runtime statistics." since teardown can run mid-execution, and fix the comments on rejected persists and the spec header.
|
@bobbai00 I addressed all your comments! Can you have one more pass? Thanks. |
What changes were proposed in this PR?
Problem.
ExecutionStatsServicequeues eachRuntimeStatisticsPersiston its own persist thread, but closes the runtime statistics writer directly on the callback thread when the execution reaches a terminal state. The engine reports the final statistics right before the terminal state, soclose()can flush and commit before that last snapshot is written. The snapshot then sits in the writer's buffer and is never committed. The persist executor is also never shut down, so every execution leaves an idle thread behind. A user kill or a fatal error never sends a terminal state at all, so those runs never commit their buffered statistics either, and the service is only torn down at the next run or about 30 s after the last tab disconnects.Fix. A new
commitAndStoprunsclose()on the persist thread, behind anything still queued, waits for it (up to 60 s, so the commit stays synchronous as before), and then shuts the executor down. It runs once, on whichever comes first: the terminal state, a fatal error, or teardown. A failed run is committed as soon as it fails. A killed run is committed on teardown, in the background, so starting the next run does not wait for it. Statistics that arrive after that are dropped instead of being rejected into the client's error handler.Not included.
ExecutionConsoleServicehas the same pattern: console messages are written on a single-thread executor, but the writers are closed on the callback thread. That is tracked in #9641 and will get the same fix in a separate PR.Any related issues, documentation, discussions?
Closes #9627. Found while reviewing #9594.
How was this PR tested?
Three tests were added to
ExecutionStatsServiceSpec:unsubscribeAlleach commit buffered statistics and shut the executor downWithout the fix, the first test reads back no rows (
List()whereList("opA")was expected) and the second fails too; the third tests fatal-error and teardown commits that didn't exist before. The existing persistence tests waited for the persist thread before sending the terminal state, which is why they passed.The first command runs 28 tests, and all pass; the second is clean. Across all of
org.apache.texera.web.service.*, the only failures are twoWorkflowServiceSpectests that fail the same way onmain(a warehouse setting on my machine) and fourResultExportServiceSpectests that need port 9092, which my local stack holds.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code, Claude Opus 5.5