Dandandan commented on code in PR #380:
URL: https://github.com/apache/arrow-ballista/pull/380#discussion_r999657737
##########
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:
Yeah I did something like that, but after polling.
I would prefer to see if we can keep it like this (acquiring+release before
poll instead of acquiring directly), as I want to add the possibility to
retrieve multiple tasks from the scheduler based on
`semaphore.available_permits()` (and then acquire those permits later based on
the nr. of tasks that are returned).
--
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]