lzdanski commented on code in PR #33620:
URL: https://github.com/apache/airflow/pull/33620#discussion_r1322084386


##########
docs/apache-airflow/authoring-and-scheduling/deferring.rst:
##########
@@ -18,45 +18,48 @@
 Deferrable Operators & Triggers
 ===============================
 
-Standard :doc:`Operators </core-concepts/operators>` and :doc:`Sensors 
<../core-concepts/sensors>` take up a full *worker slot* for the entire time 
they are running, even if they are idle; for example, if you only have 100 
worker slots available to run Tasks, and you have 100 DAGs waiting on a Sensor 
that's currently running but idle, then you *cannot run anything else* - even 
though your entire Airflow cluster is essentially idle. ``reschedule`` mode for 
Sensors solves some of this, allowing Sensors to only run at fixed intervals, 
but it is inflexible and only allows using time as the reason to resume, not 
anything else.
+Standard :doc:`Operators </core-concepts/operators>` and :doc:`Sensors 
<../core-concepts/sensors>` take up a full *worker slot* for the entire time 
they are running, even if they are idle. For example, if you only have 100 
worker slots available to run tasks, and you have 100 DAGs waiting on a sensor 
that's currently running but idle, then you *cannot run anything else* - even 
though your entire Airflow cluster is essentially idle. ``reschedule`` mode for 
sensors solves some of this, by allowing sensors to only run at fixed 
intervals, but it is inflexible and only allows using time as the reason to 
resume, not other criteria.
 
-This is where *Deferrable Operators* come in. A deferrable operator is one 
that is written with the ability to suspend itself and free up the worker when 
it knows it has to wait, and hand off the job of resuming it to something 
called a *Trigger*. As a result, while it is suspended (deferred), it is not 
taking up a worker slot and your cluster will have a lot less resources wasted 
on idle Operators or Sensors. Note that by default deferred tasks will not use 
up pool slots, if you would like them to, you can change this by editing the 
pool in question.
+This is where *Deferrable Operators* can be used. A deferrable operator can 
suspend itself and free up the worker for other processes when certain 
conditions are met. A pre-defined *Trigger* then resumes the deferred operator. 
As a result, while it is suspended (deferred) and isn't using worker slot, your 
cluster has fewer resources wasted on idle operators or sensors. By default, 
deferred tasks don't use pool slots. If you would like them to, you can change 
this by editing the pool in question.

Review Comment:
   Thanks so much for the edits! I took a stab at it based on your suggestions 
- definitely helped me get closer. 



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