Repository navigation
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
49a1693 to
c2d2848
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9271 +/- ##
=========================================
Coverage 91.57% 91.57%
- Complexity 5182 5184 +2
=========================================
Files 1300 1300
Lines 58131 58074 -57
Branches 7615 7610 -5
=========================================
- Hits 53235 53183 -52
+ Misses 2958 2954 -4
+ Partials 1938 1937 -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:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 710 | 0.433 | 11,822/21,953/21,953 us | 🟢 -14.4% / 🔴 +58.4% |
| 🟢 | bs=100 sw=10 sl=64 | 1,690 | 1.031 | 57,588/76,765/76,765 us | 🟢 -13.3% / 🟢 -28.2% |
| 🔴 | bs=1000 sw=10 sl=64 | 2,059 | 1.256 | 474,208/665,702/665,702 us | 🔴 +22.9% / 🟢 +46.4% |
Baseline details
Latest main bf6bf9f from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 710 tuples/sec | 749 tuples/sec | 1,019 tuples/sec | -5.2% | -30.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.433 MB/s | 0.457 MB/s | 0.622 MB/s | -5.3% | -30.4% |
| bs=10 sw=10 sl=64 | p50 | 11,822 us | 13,807 us | 10,136 us | -14.4% | +16.6% |
| bs=10 sw=10 sl=64 | p95 | 21,953 us | 20,526 us | 13,860 us | +7.0% | +58.4% |
| bs=10 sw=10 sl=64 | p99 | 21,953 us | 20,526 us | 16,484 us | +7.0% | +33.2% |
| bs=100 sw=10 sl=64 | throughput | 1,690 tuples/sec | 1,630 tuples/sec | 1,363 tuples/sec | +3.7% | +24.0% |
| bs=100 sw=10 sl=64 | MB/s | 1.031 MB/s | 0.995 MB/s | 0.832 MB/s | +3.6% | +23.9% |
| bs=100 sw=10 sl=64 | p50 | 57,588 us | 56,525 us | 79,194 us | +1.9% | -27.3% |
| bs=100 sw=10 sl=64 | p95 | 76,765 us | 88,532 us | 87,022 us | -13.3% | -11.8% |
| bs=100 sw=10 sl=64 | p99 | 76,765 us | 88,532 us | 106,894 us | -13.3% | -28.2% |
| bs=1000 sw=10 sl=64 | throughput | 2,059 tuples/sec | 2,029 tuples/sec | 1,407 tuples/sec | +1.5% | +46.4% |
| bs=1000 sw=10 sl=64 | MB/s | 1.256 MB/s | 1.238 MB/s | 0.859 MB/s | +1.5% | +46.3% |
| bs=1000 sw=10 sl=64 | p50 | 474,208 us | 490,710 us | 776,422 us | -3.4% | -38.9% |
| bs=1000 sw=10 sl=64 | p95 | 665,702 us | 541,787 us | 814,091 us | +22.9% | -18.2% |
| bs=1000 sw=10 sl=64 | p99 | 665,702 us | 541,787 us | 860,577 us | +22.9% | -22.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,281.79,200,128000,710,0.433,11821.55,21952.76,21952.76
1,100,10,64,20,1183.44,2000,1280000,1690,1.031,57587.65,76764.71,76764.71
2,1000,10,64,20,9715.62,20000,12800000,2059,1.256,474207.58,665701.76,665701.76|
@Xiao-zhen-Liu please remove release 1.2/1.3 labels if you can! I mentioned fix and it got tagged. |
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Thanks for breaking this out cleanly and rebasing onto main, @sshiv012! Keying WorkflowResultStore by GlobalPortIdentity (excluding internal ports), looking up each port's output mode via outputModeOf, and recording result_size per table port in operator_port_executions all look great.
Looking at #9271 together with #9272 (and #9054), one design question comes up: the result pipeline still special-cases port 0 (isFirstPort = portId == PortIdentity() in ExecutionResultService.scala and portIndex === 0 in workflow-result.service.ts) and adds a separate path in #9272 for ports >= 1. Ideally, the result logic should be generic to any output port rather than specific to the first port:
| Layer | Port-0-special-cased split (#9054 + #9271 + #9272) on Split-1 (port 0: 3 rows, port 1: 12 rows) |
Port-generic design |
|---|---|---|
Backend diff handler (ExecutionResultService.scala) |
Checks if (isFirstPort). #9271 drops result updates and tableStats for port 1; #9272 routes port 0 to updates and port 1 to portUpdates, and still skips tableStats for port 1. |
Drop isFirstPort so every changed external output port (opId, portId) writes convertWebResultUpdate and (when outputMode != SINGLE_SNAPSHOT) getTableStatistics into the same per-port maps. |
Websocket event (WebResultUpdateEvent.scala) |
Splits port 0 (updates, tableStats keyed by opId) from later ports (portUpdates keyed by opId -> portIndex, with no stats for later ports). |
Key both fields uniformly by opId -> portIndex for all ports (including port 0): updates: Map[String, Map[Int, WebResultUpdate]] and tableStats: Map[String, Map[Int, Map[String, Map[String, Any]]]] (without a separate portUpdates field). |
Frontend result service (workflow-result.service.ts) |
Keeps paginatedResultServices, operatorResultServices, and resultUpdateStream for port 0 alongside otherPortResultServices, otherPortDataServices, livePaginatedPorts, and portResultUpdateStream for ports >= 1, branching on portIndex === 0. |
Keep one map per output kind keyed by portKey(operatorID, portIndex) ("Split-1:0", "Split-1:1"), one update handler, and default portIndex: number = 0 on existing getters (getPaginatedResultService(opId, portIndex = 0)). |
Frontend pagination cache (OperatorPaginationResultService) |
Disables resultCache when this.portIndex !== 0 (useCache = this.portIndex === 0 && ...), sets currentTotalNumTuples in handlePaginationResult only when portIndex !== 0, and omits portIndex on requests for port 0. |
Since every port receives live WebPaginationUpdate (totalNumTuples and dirtyPageIndices) and tableStats, use the same resultCache, handleResultUpdate, handleStatsUpdate, and ResultPaginationRequest logic for every portIndex. |
Since the isFirstPort branch in #9271 is only needed while WebResultUpdateEvent remains keyed by operator ID alone, could we either update WebResultUpdateEvent and WorkflowResultService to the uniform per-port structure here or fold #9272 into this PR so we can avoid introducing the port-0 special case? I also left a few small inline notes below, and removed the accidental release/v1.2 label so the backport check clears.
An operator's result was tracked and sent for its first output port only: WorkflowResultStore was keyed by operator, WebResultUpdateEvent carried one update and one set of table statistics per operator, and the frontend paged any other port on request and re-read it on a timer. Every external output port now goes through the same path. - WorkflowResultStore is keyed by GlobalPortIdentity; internal ports are left out. - onResultUpdate records result_size and result_count in operator_port_executions for every table port, not only port 0. - WebResultUpdateEvent keys `updates` and `tableStats` by operator id, then by output port index, for every port including 0. Each port uses its own output mode and its own table statistics. - WorkflowResultService keeps one map of paged results and one of visualization results, both keyed by operator and port; the getters take a port index that defaults to 0. Every port uses the same page cache, live updates and statistics. - The result table follows the updates and statistics of the port it shows, so it no longer re-reads a later port's page on a timer or on completion. Related: apache/texera discussion apache#8914. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SRmgtBces67YppgKLHoZHa
81cb1d2 to
60f03c7
Compare
The diff handler looked up and opened a port's result document twice, once for the result update and once for the table statistics. It now opens it once and hands it to convertWebResultUpdate. The runtime statistics size is recorded once per poll and the console message size once per changed operator, rather than once per changed port. Also corrects a test comment about the change detector: it makes the diff handler run, but only ports whose row count changed are sent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SRmgtBces67YppgKLHoZHa
|
Thanks @Xiao-zhen-Liu. I folded #9272 into this PR and took the port-generic design:
The description is updated. I'll close #9272 as folded in here. 🤖 Generated with Claude Code |
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Thanks for folding #9272 into this PR, @sshiv012. I reviewed the updated branch from main at cef08c8d42. Every external output port goes through the same path: updates and table statistics are keyed by operator and port index, each changed port's storage document is opened once per poll, and execution statistics and console sizes are recorded once per poll and once per changed operator. All four earlier comments are addressed. The only failing check, the macOS frontend job, hit a hook timeout in an unrelated preset service test while Ubuntu and Windows frontend checks passed. Approving, with one optional naming nit inline.
| import org.apache.texera.amber.core.virtualidentity.OperatorIdentity | ||
| import org.apache.texera.amber.core.workflow.GlobalPortIdentity | ||
|
|
||
| case class OperatorResultMetadata(tupleCount: Int = 0, changeDetector: String = "") |
There was a problem hiding this comment.
Nit: Each entry in the result store describes one output port rather than a whole operator, so this metadata class could say port instead of operator. Fine to leave as is.
There was a problem hiding this comment.
Renamed it to PortResultMetadata (including its spec) in 7980b5d. Thanks for the review!
…etadata Each entry in WorkflowResultStore now describes one output port, keyed by GlobalPortIdentity, so the metadata class is named for a port. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SRmgtBces67YppgKLHoZHa
What changes were proposed in this PR?
An operator's result was tracked and sent for its first output port only.
WorkflowResultStorewas keyed by operator, andWebResultUpdateEventcarried one update and one set of table statistics per operator. The frontend paged any other port on request and re-read it on a timer. This PR sends every external output port through the same path, with no special case for port 0. It folds in #9272, as suggested in review.Backend
WorkflowResultStoreis keyed byGlobalPortIdentity; internal ports are left out.onResultUpdaterecordsresult_sizeandresult_countinoperator_port_executionsfor every table port, not only port 0. This builds on feat(amber): record each result port's output mode and row count #9049'supdateResultSizeAndCount.WebResultUpdateEventkeys bothupdatesandtableStatsby operator id, then by output port index, for every port including 0. There is no separateportUpdatesfield. Each port uses its own output mode and its own table statistics.{ "updates": { "Split-1": { "0": {...}, "1": {...} } }, "tableStats": { "Split-1": { "0": {...}, "1": {...} } } }Frontend
WorkflowResultServicekeeps one map of paged results and one of visualization results, both keyed"op:port".getPaginatedResultService,getResultService,hasAnyResultand similar getters take aportIndexthat defaults to 0.getPortPaginatedResultServiceis removed.OperatorPaginationResultServiceuses the same page cache, live updates, statistics and requests for every port.ResultTableFrameComponentfollows the updates and statistics of the port it shows. So the pinned window's port tabs (feat(frontend): pin an operator's result beside it, with a tab per output port #9063) no longer re-read a later port on a timer or when the operator completes.Compatibility
The websocket message shape changes: an operator's update is now nested under its port index. The frontend and backend ship together, so nothing else reads it. Nothing stored changes:
operator_port_executionskeeps the same columns, and saved workflows are untouched.Any related issues, documentation, discussions?
Related: discussion #8914. Supersedes #9272. Builds on #9049 and #9063.
How was this PR tested?
ExecutionResultServiceSpec(42),TexeraWebSocketEventSpec(11),WorkflowResultStoreSpec(7) andWorkflowServiceSpec(11, withSTORAGE_WAREHOUSE_ENABLED=false). The new tests cover:updates, keyed by port;ng testsuite (254 files) passes, with new per-port tests forWorkflowResultService,OperatorPaginationResultServiceandResultTableFrameComponent.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Code (Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SRmgtBces67YppgKLHoZHa