[AIRFLOW-6852] Force reschedule mode for sensors when running on SequentialExecutor#7473
Conversation
|
Can you check how this will work with the following change? Stateful sensors should not be used in reschedule mode. |
|
@nuclearpinguin This change would effectively prohibit using poke-only sensors together with SequentialExecutor - SequentialExecutor would force the reschedule mode and the code in PR you linked would cause DAG parsing to fail. |
|
The SequentialExecutor stops heartbeating when running a task, so this is very very unlikely to be used in production, as you'd constantly get "The scheduler is not running" notices in the UI. I'm not even sure we should have Sequential executor anymore. LocalExecutor with a single process would be much much better. |
| if isinstance(task_copy, BaseSensorOperator) and \ | ||
| conf.get('core', 'executor') == "DebugExecutor": | ||
| conf.get('core', 'executor') in ["DebugExecutor", "SequentialExecutor"]: | ||
| self.log.warning("DebugExecutor changes sensor mode to 'reschedule'.") |
SequentialExecutor is currently the only one allowed for SQLIte But indeed, if we change it to enforce the LocalExecutor and count ==1 this might work and we can get rid of the Sequential executor. |
|
And I've heard anecdotal evidence of people using sqlite in production. Unluckily we haven't asked for the database in the survey :( |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Force reschedule mode for sensors when running on SequentialExecutor to avoid deadlocks.
Issue link: AIRFLOW-6852
Make sure to mark the boxes below before creating PR: [x]
[AIRFLOW-NNNN]. AIRFLOW-NNNN = JIRA ID** For document-only changes commit message can start with
[AIRFLOW-XXXX].In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.