Yicong-Huang commented on code in PR #5720:
URL: https://github.com/apache/texera/pull/5720#discussion_r3411171255


##########
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:
   let's add a test to cover these lines



-- 
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]

Reply via email to