Ma77Ball opened a new issue, #5851:
URL: https://github.com/apache/texera/issues/5851

   ### Task Summary
   `createRegionDAG()` runs the region-plan search in a `Future` and blocks on 
`Await.result(..., searchTimeoutMilliseconds)` 
(`CostBasedScheduleGenerator.scala:318`). It runs once per workflow execution 
from `Controller.preStart` -> `initState` on the actor dispatcher, bounded by 
`schedule-generator.search-timeout-milliseconds` (default 1000ms).
   
   The `Await` is intentional: it enforces that timeout and falls back to 
greedy `bottomUpSearch` on `TimeoutException`, so it cannot simply be deleted. 
The concern is that it parks a shared Akka dispatcher thread for up to ~1s at 
startup, which can momentarily steal a pool thread from other co-located 
actors/workflows.
   
   A fully non-blocking version would require threading a `Future` through 
`WorkflowScheduler.updateSchedule`, `Controller.initState`, and downstream 
consumers that immediately read `getSchedule`, which is invasive (actor 
`preStart` cannot cleanly await). Open question for discussion: is the ~1s 
startup block worth that refactor, or is a lighter mitigation (dedicated 
dispatcher / `scala.concurrent.blocking {}` hint) sufficient?
   ### Task Type
   - [x] Performance


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