Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only heartbeat if necessary in backfill loop #39399

Merged
merged 2 commits into from May 6, 2024

Conversation

dstandish
Copy link
Contributor

@dstandish dstandish commented May 3, 2024

Currently, backfill sleeps for a minute in every iteration, which is extremely slow.

The reason is that it waits synchronously until a heartbeat is necessary. Since the loop is otherwise fast, this results in waits of up to a minute between syncing.

With this change, if we don't add sleep(1), the loop will be very fast and generate tons of logs. So I sleep each second to slow it down just a bit.

Currently, backfill sleeps for a minute in every iteration, which is extremely slow.
@boring-cyborg boring-cyborg bot added the area:Scheduler Scheduler or dag parsing Issues label May 3, 2024
@dstandish dstandish added this to the Airflow 2.9.1 milestone May 3, 2024
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label May 3, 2024
@bolkedebruin
Copy link
Contributor

Can we have a little bit more explanation here that documents what you are changing? In addition the time.sleep(1) is very confusing why that is needed and if it can't be done differently.

@dstandish
Copy link
Contributor Author

Can we have a little bit more explanation here that documents what you are changing? In addition the time.sleep(1) is very confusing why that is needed and if it can't be done differently.

added description

@dstandish dstandish merged commit fb16953 into apache:main May 6, 2024
41 checks passed
@dstandish dstandish deleted the only-heartbeat-if-nec-in-backfill branch May 6, 2024 15:24
RodrigoGanancia pushed a commit to RodrigoGanancia/airflow that referenced this pull request May 10, 2024
Currently, backfill sleeps for a minute in every iteration, which is extremely slow.

The reason is that it waits synchronously until a heartbeat is necessary. Since the loop is otherwise fast, this results in waits of up to a minute between syncing.

With this change, if we don't add sleep(1), the loop will be very fast and generate tons of logs. So I sleep each second to slow it down just a bit.
pateash pushed a commit to pateash/airflow that referenced this pull request May 13, 2024
Currently, backfill sleeps for a minute in every iteration, which is extremely slow.

The reason is that it waits synchronously until a heartbeat is necessary. Since the loop is otherwise fast, this results in waits of up to a minute between syncing.

With this change, if we don't add sleep(1), the loop will be very fast and generate tons of logs. So I sleep each second to slow it down just a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler Scheduler or dag parsing Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants