Tony Brookes created AIRFLOW-6974:
-------------------------------------
Summary: 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: db
Affects Versions: 1.10.9
Reporter: Tony Brookes
Attachments: airflow-mssql-stack-trace.txt
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 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 as 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, but 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)