The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
82224eaca8d2e10a9b077cb1bf406601fdc6ff18 / Xinyuan Lin <[email protected]>
refactor(amber): simplify control, scheduling, and stats (#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, take in-scope data channels
from running links whose two operators are in scope instead of parsing
worker names, 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 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).

After review, in-scope data channels come from each running link whose
two operators are in scope, `Region` gains no member or
`@SerialVersionUID`, and FRIES maps each connected component once with
`getSourceOperatorIds`. On the final head, the same command, run on JDK
17 with freshly generated jOOQ classes, again completed 34 suites with
all 333 tests passing.

### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity IDE (Gemini 3.8 Flash), Claude Code (Claude
Opus 5.5)

Report URL: https://github.com/apache/texera/actions/runs/44049552614

With regards,
GitHub Actions via GitBox

Reply via email to