tfeda commented on code in PR #380:
URL: https://github.com/apache/arrow-ballista/pull/380#discussion_r999607167
##########
ballista/executor/src/execution_loop.rs:
##########
@@ -162,7 +165,7 @@ async fn run_received_tasks<T: 'static + AsLogicalPlan, U:
'static + AsExecution
task_id, job_id, stage_id, stage_attempt_num, partition_id,
task_attempt_num
);
info!("Received task {}", task_identity);
- available_tasks_slots.fetch_sub(1, Ordering::SeqCst);
+ let permit = available_task_slots.clone().acquire_owned().await.unwrap();
Review Comment:
I'd be careful acquiring a permit _after_ retrieving a task from the
scheduler. I'm imagining a scenario where the executor retrieves a task to
execute, but then that task sits waiting for a permit to open up. could we move
this call up to `poll_loop`, before `scheduler.poll_work()` is called?
--
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]