xinbinhuang commented on a change in pull request #6975: [AIRFLOW-1467] Dynamic 
pooling via allowing tasks to use more than one pool slot (depending upon the 
need)
URL: https://github.com/apache/airflow/pull/6975#discussion_r363649789
 
 

 ##########
 File path: airflow/models/baseoperator.py
 ##########
 @@ -309,6 +311,7 @@ def __init__(
         weight_rule: str = WeightRule.DOWNSTREAM,
         queue: str = conf.get('celery', 'default_queue'),
         pool: str = Pool.DEFAULT_POOL_NAME,
+        pool_capacity: int = 1,
 
 Review comment:
   Should `pool_capacity` be ensured to `>= 1`? Otherwise, we may possibly end 
up with negative used/queued slots, which will make the calculated `open_slots` 
> preset `slots`  (see 
[here](https://github.com/apache/airflow/blob/ed221501ae51d5b0d7b4d60bc928d10e4f971a02/airflow/models/pool.py#L113)
 ). Any thoughts? @dimberman @ashb @mik-laj  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to