aglinxinyuan opened a new pull request, #9508:
URL: https://github.com/apache/texera/pull/9508
### What changes were proposed in this PR?
Remove redundant passes, duplicate channel-resolution code, and repeated
allocations across Amber's coordinator, scheduler, replay/checkpoint, and
web-service paths without changing external behavior:
- **Coordinator control & reconfiguration:** Share one control-channel scope
resolver and source-ECM dispatcher between embedded control propagation and
workflow reconfiguration, lazily memoize physical-op lookups by worker
identity, pass operator sets directly from connected components in FRIES
instead of regrouping the sub-plan, and drop unused intermediate collections
and request parameters.
- **Scheduling & worker deployment:** Use O(1) frontier membership tracking
(`inQueue`), DAG `inDegreeOf`, and shared frontier queuing in schedule
generation; avoid redundant operator/port traversals in region source/starter
computation; hoist invariant deployment and execution-scoped URI lookups
outside per-worker loops.
- **Log replay & checkpointing:** Reuse the termination sentinel and drain
list slice directly in `AsyncReplayLogWriter`, replace the non-local-return
closure in `ReplayLogGenerator` with an explicit loop, combine map lookups in
worker/checkpoint state paths, skip allocating an empty `CheckpointState` on
estimate-only global checkpoints, and reuse `Future.join` where return values
are discarded.
- **Console & runtime statistics:** Avoid extra `OperatorConsole` / map /
timestamp / schema allocations, share one single-pass port-metric aggregation
helper across live websocket updates and Iceberg persistence, and simplify
terminal-state and stats-diff checks.
### Any related issues, documentation, discussions?
Closes #9507.
### How was this PR tested?
Added characterization tests upfront covering `RetrieveWorkflowStateHandler`
reply mapping and running-region source selection, `Region` internal/external
source links and materialized input starters, `ScheduleGenerator` DAG
topological batching, `FriesReconfigurationAlgorithm`
empty/multi-op/mixed-component cases, `EmbeddedControlMessageHandler`
multi-worker source injection, and `ExecutionConsoleService` /
`ExecutionStatsService` expression diffs and multi-port aggregation.
Verified after the final commit with `STORAGE_ICEBERG_CATALOG_TYPE=hadoop`
and `UDF_PYTHON_PATH` set:
```bash
sbt \
"WorkflowExecutionService/scalafix --check" \
"WorkflowExecutionService/Test/scalafix --check" \
"WorkflowExecutionService/scalafmtCheck" \
"WorkflowExecutionService/Test/scalafmtCheck" \
"WorkflowExecutionService/testOnly *EmbeddedControlMessageHandlerSpec
*RetrieveWorkflowStateHandlerSpec *TakeGlobalCheckpointHandlerSpec
*FinalizeCheckpointHandlerSpec *PrepareCheckpointHandlerSpec
*AsyncReplayLogWriterSpec *ReplayLogGeneratorSpec *ReplayLogManagerImplSpec
*EmptyReplayLogManagerImplSpec *CheckpointSpec *CheckpointSubsystemSpec
*FriesReconfigurationAlgorithmSpec *RegionSpec *RegionPlanSpec *ScheduleSpec
*SchedulingConfigsSpec *SchedulingUtilsSpec *CostBasedScheduleGeneratorSpec
*WorkflowSchedulerSpec *WorkflowExecutionManagerSpec
*RegionExecutionManagerSpec *ExecutionStatsServiceSpec
*ExecutionConsoleServiceSpec *ExecutionReconfigurationServiceSpec
*WorkflowExecutionServiceSpec *SerializationManagerSpec *OperatorExecutionSpec
*RegionExecutionSpec *WorkflowExecutionSpec *CoordinatorSpec
*WorkflowWorkerSpec *ReconfigurationSpec"
```
Observed result: 34 suites completed, 333 tests succeeded (0 failed, 0
canceled/skipped).
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity IDE (Gemini 3.8 Flash)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]