Skip to content

[AIRFLOW-92] Avoid unneeded upstream_failed session commits#1485

Closed
underyx wants to merge 1 commit intoapache:masterfrom
underyx:AIRFLOW-92
Closed

[AIRFLOW-92] Avoid unneeded upstream_failed session commits#1485
underyx wants to merge 1 commit intoapache:masterfrom
underyx:AIRFLOW-92

Conversation

@underyx
Copy link
Contributor

@underyx underyx commented May 10, 2016

Resolves: https://issues.apache.org/jira/browse/AIRFLOW-92

It looks like this is the only place where set_state is used, so it should be safe to move the commit there I think. If the commit is done where it was before, then there will be a commit even if state updates are disabled (flag_upstream_failed=False), expiring objects in the session, and causing the issue referenced in the Jira ticket.

@underyx underyx changed the title Avoid unneeded upstream_failed session commits [AIRFLOW-92] Avoid unneeded upstream_failed session commits May 10, 2016
@bolkedebruin
Copy link
Contributor

This will not work, as now the necessary commits are not taking place.

@bolkedebruin
Copy link
Contributor

LGTM, for reference sake:

set_state is only called when flag_upstream_failed=True this will be always false for are_dependencies_met as it defaults to False. This means no "session.commit()" will be called anymore.

So this will resolve the issue. However the core issue remains and that is that a getter should not change the internal state of the object. That is another issue, so will merge.

@asfgit asfgit closed this in dddfd3b May 10, 2016
yiqingj pushed a commit to yiqingj/airflow that referenced this pull request May 27, 2016
* master:
  AIRFLOW-92 Avoid unneeded upstream_failed session closes apache#1485
  AIRFLOW-52 Warn about overwriting tasks in a DAG
  Add logic to lock DB and avoid race condition
  Handle queued tasks from multiple jobs/executors
  [AIRFLOW-80] Move example_twitter dag to contrib/example_dags as it requires hive
  [AIRFLOW-75] Fix bug in S3 config file parsing
  Use getfqdn to make sure urls are fully qualified
  [AIRFLOW-52] Fix bottlenecks when working with many tasks
  Add bulk_dump abstract method to DbApiHook (apache#1471)
  Fix corner case with joining processes/queues (apache#1473)
  [AIRFLOW-53] Adding DagBag stats report to CLI's list_dags (apache#1468)
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Nov 22, 2019
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Dec 5, 2019
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jan 16, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jan 23, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 7, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 7, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 8, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 9, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 10, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 11, 2020
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 10, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 18, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 18, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 23, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 24, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 1, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 2, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 3, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 3, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 9, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 14, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 15, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 16, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 16, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 23, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 14, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 16, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 22, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Nov 24, 2021
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Feb 3, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Mar 1, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 3, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
hankehly pushed a commit to hankehly/airflow that referenced this pull request Jun 13, 2022
Convert sync-perm command to click and make tests compatible.
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jul 8, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Aug 26, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 3, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
aglipska pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 6, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Dec 6, 2022
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jan 26, 2023
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
ahidalgob pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 24, 2023
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to kosteev/composer-airflow-test-copybara that referenced this pull request Sep 11, 2024
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to kosteev/composer-airflow-test-copybara that referenced this pull request Sep 12, 2024
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 16, 2024
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to kosteev/composer-airflow-test-copybara that referenced this pull request Sep 17, 2024
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Nov 6, 2024
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Apr 30, 2025
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request May 20, 2025
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 15, 2025
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 14, 2025
…ow#1485

GitOrigin-RevId: dddfd3b5bf2cabaac6eec123dfa3cb59e73a56f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants