You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sam T (Jira)" <ji...@apache.org> on 2020/04/22 19:03:00 UTC

[jira] [Comment Edited] (AIRFLOW-6974) Using MS SQL Server 17 as a backend, Migration cc1e65623dc7_add_max_tries_column_to_task_instance.py fails if load_examples = True

    [ https://issues.apache.org/jira/browse/AIRFLOW-6974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089938#comment-17089938 ] 

Sam T edited comment on AIRFLOW-6974 at 4/22/20, 7:02 PM:
----------------------------------------------------------

Hi [~RosterInn], not a perfect solution. I verified you can delete the example_subdag_operator.py, the initdb will work. I verified with the following SQL server.

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) 

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)  Nov 30 2018 12:57:58  Copyright (C) 2017

Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
h2. Remove:
h2. .../airflow/example_dags/*example_subdag_operator.py*


was (Author: samkhtu):
Hi [~RosterInn], not a perfect solution. I verified you can delete the example_subdag_operator.py, the initdb will work. I verified with the following SQL server.

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) 

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)  Nov 30 2018 12:57:58  Copyright (C) 2017

Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
h2. Remove:
h2. [airflow|https://github.com/apache/airflow/tree/v1-10-stable]/[airflow|https://github.com/apache/airflow/tree/v1-10-stable/airflow]/[example_dags|https://github.com/apache/airflow/tree/v1-10-stable/airflow/example_dags]/*example_subdag_operator.py*

> Using MS SQL Server 17 as a backend, Migration cc1e65623dc7_add_max_tries_column_to_task_instance.py fails if load_examples = True
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-6974
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6974
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: database
>    Affects Versions: 1.10.9
>            Reporter: Tony Brookes
>            Priority: Minor
>         Attachments: airflow-mssql-stack-trace.txt, image-2020-04-20-18-14-10-275.png
>
>
> This took me a while to figure out as there was another issue with the migration in question which is cc1e65623dc7_add_max_tries_column_to_task_instance.py
> This file USED to have an issue where it would sit there forever during an initdb on MS SQL Server, essentially deadlocked with itself.
> I couldn't figure out why it was still sitting there for me, given that I was using the version of the migration where this had been fixed, so I went looking at the locks on the DB.  I found TWO processes running on the DB both originating inside the airflow initdb Python instance.
> The first was happily sitting there trying to query the max_retries column on a table, but the other was attempting to query the table "slot_pool" from within example_subdag_operator.py .  I killed the session which was querying that table and of course my Python process crashed, helpfully with a stack trace.
> The session I killed was interacting with the DB running in EXAMPLES and was actually complaining that the table was not a valid object name.  As soon as I set load_examples = False, the initdb process ran through in a few seconds and all was well.  But with load_examples = True it would reliably hang on this specific migration every single time.
> I have attached a full stack trace from when I terminated the second DB session.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)