-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
[AIRFLOW-6451] self._print_stat() in dag_processing.py should be skippable #7096
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7096 +/- ##
==========================================
- Coverage 85.15% 84.87% -0.29%
==========================================
Files 680 680
Lines 38824 38822 -2
==========================================
- Hits 33061 32949 -112
- Misses 5763 5873 +110
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks!
@@ -691,6 +688,7 @@ def start(self): | |||
"have been processed %s times", self._max_runs) | |||
break | |||
|
|||
# TODO can this be removed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tooptoop4 Please don't add comments like this -- it just makes it harder and confusing for the next person who comes along.
The answer is no - async mode is still needed -- when using SQLlite we run "synchronously" as it doesn't have well/at all with multiple access, so we want to "stop" as soon as we're done, not sleep. poll_time=None in sync mode, which says wait until a message is sent on L639.
Please remove this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashb async mode is not sqllite. so i am questioning why non-sqllite need that IF block at all. ie can non-sqllite use original poll time set on L626
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async mode is set to true when sqlite is in use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashb I think u are confused here, see https://github.com/apache/airflow/blob/master/airflow/jobs/scheduler_job.py#L1485
# When using sqlite, we do not use async_mode
# so the scheduler job and DAG parser don't access the DB at the same time.
async_mode = not self.using_sqlite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whops yes totally backwards. Sqlite is sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But no, I don't think this can be removed -- the default timeout is 0 which means this would sit in a busy/CPU consuming loop.
Instead of a new config option what do you think of using the existing |
makes sense @ashb , can I link a new PR to same JIRA or should I create new JIRA? |
@tooptoop4 Great. I'll revert this change and you can re-use the same Jira. (The reason for reverting is so that if we want to cherry-pick the change to 1.10 then we only have one commit to backport, otherwise we'd get a conflict) |
#7134 raised |
…pable by config option (apache#7096)
… be skippable by config option (apache#7096)" (apache#7129) This reverts commit 77b1bdc. Reverts apache#7096 to do in a slightly different way (without a new config option), and reverting this so that the new change is easier to backport to 1.10 releases.
Issue link: AIRFLOW-6451
[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.