Skip to content

Fix locking issue stopping tasks running with SequentialExecutor#11797

Merged
kaxil merged 1 commit intoapache:masterfrom
astronomer:fix-sequential-executor-deadlock
Oct 23, 2020
Merged

Fix locking issue stopping tasks running with SequentialExecutor#11797
kaxil merged 1 commit intoapache:masterfrom
astronomer:fix-sequential-executor-deadlock

Conversation

@ashb
Copy link
Member

@ashb ashb commented Oct 23, 2020

Missing a commit means that the the row level lock was not released
before executor.heartbeat() was called. This was only a problem for
the SequentialExecutor, as all the other executors would continue
running the scheduler code so the lock would be released shortly after
tasks are sent to the executor anyway. (Where as SequentialExecutor
doesn't return control until tasks have run!)

Fixes #11788 #11787


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
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.

Missing a commit means that the the row level lock was not released
before `executor.heartbeat()` was called.  This was only a problem for
the SequentialExecutor, as all the other executors would continue
running the scheduler code so the lock would be released shortly after
tasks are sent to the executor anyway. (Where as SequentialExecutor
doesn't return control until tasks have run!)
@ashb ashb requested review from kaxil and potiuk October 23, 2020 20:09
@boring-cyborg boring-cyborg bot added the area:Scheduler including HA (high availability) scheduler label Oct 23, 2020
@kaxil kaxil merged commit affee29 into apache:master Oct 23, 2020
@kaxil kaxil deleted the fix-sequential-executor-deadlock branch October 23, 2020 21:21
@potiuk
Copy link
Member

potiuk commented Oct 24, 2020

Cool!

@potiuk
Copy link
Member

potiuk commented Oct 24, 2020

Whoa. One line :) . Thanks @kaxil and @ashb!

michalmisiewicz pushed a commit to michalmisiewicz/airflow that referenced this pull request Oct 30, 2020
…che#11797)

Missing a commit means that the the row level lock was not released
before `executor.heartbeat()` was called.  This was only a problem for
the SequentialExecutor, as all the other executors would continue
running the scheduler code so the lock would be released shortly after
tasks are sent to the executor anyway. (Where as SequentialExecutor
doesn't return control until tasks have run!)
szn pushed a commit to szn/airflow that referenced this pull request Nov 1, 2020
…che#11797)

Missing a commit means that the the row level lock was not released
before `executor.heartbeat()` was called.  This was only a problem for
the SequentialExecutor, as all the other executors would continue
running the scheduler code so the lock would be released shortly after
tasks are sent to the executor anyway. (Where as SequentialExecutor
doesn't return control until tasks have run!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduler does not appear to be running properly in default airflow setup Database locked issue

3 participants