Repository navigation
Conversation
apache#8668 tags a failed worker RPC with the worker (WorkflowRuntimeException with relatedWorkerId), but ControlError had no field for it. When the coordinator returned the error to the web service, reconstructThrowable rebuilt a plain Throwable, so WorkflowService recorded "unknown operator" and the UI could not show the error under the failed operator (e.g. a Python UDF that fails while starting). - Add relatedWorkerId to ControlError. - mkControlError fills it from a WorkflowRuntimeException. - reconstructThrowable rebuilds a WorkflowRuntimeException when it is set, so the worker reaches WorkflowService's error handler. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Automated Reviewer SuggestionsBased on the
|
Backport auto-label reportThis
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 414 | 0.253 | 22,972/28,745/28,745 us | 🔴 +18.3% / 🔴 +127.0% |
| 🔴 | bs=100 sw=10 sl=64 | 870 | 0.531 | 114,174/132,501/132,501 us | 🔴 +11.1% / 🔴 +53.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 972 | 0.593 | 1,028,589/1,070,943/1,070,943 us | ⚪ within ±5% / 🔴 +32.8% |
Baseline details
Latest main 89a492f from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 414 tuples/sec | 467 tuples/sec | 993.83 tuples/sec | -11.3% | -58.3% |
| bs=10 sw=10 sl=64 | MB/s | 0.253 MB/s | 0.285 MB/s | 0.607 MB/s | -11.2% | -58.3% |
| bs=10 sw=10 sl=64 | p50 | 22,972 us | 19,425 us | 10,119 us | +18.3% | +127.0% |
| bs=10 sw=10 sl=64 | p95 | 28,745 us | 30,133 us | 13,394 us | -4.6% | +114.6% |
| bs=10 sw=10 sl=64 | p99 | 28,745 us | 30,133 us | 16,114 us | -4.6% | +78.4% |
| bs=100 sw=10 sl=64 | throughput | 870 tuples/sec | 904 tuples/sec | 1,327 tuples/sec | -3.8% | -34.4% |
| bs=100 sw=10 sl=64 | MB/s | 0.531 MB/s | 0.552 MB/s | 0.81 MB/s | -3.8% | -34.4% |
| bs=100 sw=10 sl=64 | p50 | 114,174 us | 111,371 us | 79,097 us | +2.5% | +44.3% |
| bs=100 sw=10 sl=64 | p95 | 132,501 us | 119,220 us | 86,335 us | +11.1% | +53.5% |
| bs=100 sw=10 sl=64 | p99 | 132,501 us | 119,220 us | 94,338 us | +11.1% | +40.5% |
| bs=1000 sw=10 sl=64 | throughput | 972 tuples/sec | 980 tuples/sec | 1,363 tuples/sec | -0.8% | -28.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.593 MB/s | 0.598 MB/s | 0.832 MB/s | -0.8% | -28.7% |
| bs=1000 sw=10 sl=64 | p50 | 1,028,589 us | 1,009,282 us | 774,633 us | +1.9% | +32.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,070,943 us | 1,110,210 us | 814,584 us | -3.5% | +31.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,070,943 us | 1,110,210 us | 858,914 us | -3.5% | +24.7% |
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,483.30,200,128000,414,0.253,22972.16,28745.18,28745.18
1,100,10,64,20,2298.10,2000,1280000,870,0.531,114174.00,132500.76,132500.76
2,1000,10,64,20,20583.76,20000,12800000,972,0.593,1028588.71,1070943.14,1070943.14
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9015 +/- ##
============================================
- Coverage 91.69% 91.68% -0.01%
- Complexity 5125 5126 +1
============================================
Files 1305 1305
Lines 58214 58159 -55
Branches 7594 7585 -9
============================================
- Hits 53377 53322 -55
Misses 2931 2931
Partials 1906 1906
*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:
|
|
When a Python UDF fails while starting, its error loses track of which operator failed on the way back to the UI, so it gets recorded as "unknown operator" and clicking the failed UDF shows an empty Console. This PR carries the failing worker through ControlError so the error lands on the right operator, and since v1.2 already has #8668 but not this fix, v1.2 and v1.3 users would hit the same confusing empty Console. @mengw15 @yangzhang75 please check if this needs to be backported (it is a small fix). |
|
Removing release/v1.2: diagnostics only, and it changes the control protocol. |
|
/request-review @Xiao-zhen-Liu |
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Looks good to approve. Carrying relatedWorkerId on ControlError and rebuilding a WorkflowRuntimeException in reconstructThrowable preserves the failing worker when a first-region launch failure returns through startWorkflow, so WorkflowService attributes it to the failing operator instead of "unknown operator" and drops the extra java.lang.Throwable: prefix. I traced the path between worker, coordinator, and web service, checked that Python worker replies stay unchanged, and ran the four unit specs (56 tests), both DataProcessingSpec initialization tests (2 tests), and scalafmtCheck at head b2e14c44e7, all passing. Three non-blocking nits inline.
…own headings Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changes were proposed in this PR?
#8668 tags a failed worker RPC with the worker it targeted (
WorkflowRuntimeExceptionwithrelatedWorkerId), so the surfaced error can point at that worker. But the worker is dropped one hop later: the coordinator returns the error to the web service as aControlError, which has no field for it, andErrorUtils.reconstructThrowablerebuilds a plainThrowable.WorkflowService's error handler then finds no worker and records the error as "unknown operator".You can see this with a Python UDF that fails while starting (e.g. the default template, which has no class). The coordinator log shows
WorkflowRuntimeException … Worker:WF23-PythonUDFV2-operator-udfdemo-main-0, but the UI getsoperatorId: "unknown operator". So clicking the failed UDF shows only an empty Console and no error.This PR carries the worker the rest of the way:
ControlErrorgets an optionalrelatedWorkerId(core.ActorVirtualIdentity).mkControlErrorfills it from aWorkflowRuntimeException.reconstructThrowablerebuilds aWorkflowRuntimeExceptionwith that worker when the field is set, soWorkflowServicemaps the error to the failing operator.Errors without a worker are unchanged.
Any related issues, documentation, discussions?
Follow-up to #8668 (issue #8667). Part of #8736. With this, #8771 no longer needs a frontend workaround to show a failed UDF's startup error when the UDF is clicked.
How was this PR tested?
ErrorUtilsSpec:mkControlErrorcarries the worker of aWorkflowRuntimeException, and leaves it empty otherwise;reconstructThrowablerebuilds aWorkflowRuntimeExceptionwith the worker, message and cause;getOperatorFromActorIdOpt;Throwable.ControlErrordirectly pass the new field (None).DataProcessingSpec: a source feeding a Java UDF that doesn't compile. The UDF is in the first region, so its error comes back as the reply tostartWorkflow, throughControlError. The test expects aWorkflowRuntimeExceptionnaming the UDF worker. It fails on main and passes with this PR.End to end, on a local Texera built from current main plus this PR and #8771 (which no longer has a frontend filter), I ran a Python UDF that fails while starting:
operatorIdthe UI receives"unknown operator"(workerIdempty)"PythonUDFV2-operator-udfdemo"(workerIdWorker:WF23-PythonUDFV2-operator-udfdemo-main-0)The message also loses its
java.lang.Throwable:prefix, since the rebuiltWorkflowRuntimeExceptionprints just its message.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)