aglinxinyuan commented on code in PR #5720:
URL: https://github.com/apache/texera/pull/5720#discussion_r3411444309
##########
amber/src/main/scala/org/apache/texera/amber/engine/architecture/scheduling/CostBasedScheduleGenerator.scala:
##########
@@ -304,7 +304,15 @@ class CostBasedScheduleGenerator(
*/
private def createRegionDAG(): DirectedAcyclicGraph[Region, RegionLink] = {
val searchResultFuture: Future[SearchResult] = Future {
- workflowContext.workflowSettings.executionMode match {
+ // An operator may require a fully-materialized schedule (e.g. a loop,
+ // whose back-edge is a cross-region materialized state channel). When
any
+ // does, materialize fully regardless of the requested execution mode.
+ val effectiveMode =
+ if (physicalPlan.operators.exists(_.requiresMaterializedExecution))
+ ExecutionMode.MATERIALIZED
+ else
+ workflowContext.workflowSettings.executionMode
+ effectiveMode match {
Review Comment:
Done in `2bbf760` — extracted the schedule-mode decision into
`CostBasedScheduleGenerator.effectiveExecutionMode(physicalPlan,
requestedMode)` and added two `CostBasedScheduleGeneratorSpec` cases: an
operator that requires materialization forces `MATERIALIZED` even when
`PIPELINED` is requested, and a plan with no such operator keeps the requested
mode.
--
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]