[
https://issues.apache.org/jira/browse/AIRFLOW-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15776483#comment-15776483
]
ASF subversion and git services commented on AIRFLOW-709:
---------------------------------------------------------
Commit c2a0ab5e28dd970312eea57a4c9c9bdfef6a9e57 in incubator-airflow's branch
refs/heads/master from Chad Henderson
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=c2a0ab5 ]
[AIRFLOW-709] Use same engine for migrations and reflection
Use Same Engine for Migrations and Reflection
Solves query blocking in MS-SQL server when
running initdb.
Closes #1953 from gritlogic/AIRFLOW-709
> Ariflow initdb sub-command will not run agains MS-SQL 2012
> ----------------------------------------------------------
>
> Key: AIRFLOW-709
> URL: https://issues.apache.org/jira/browse/AIRFLOW-709
> Project: Apache Airflow
> Issue Type: Bug
> Components: cli, db
> Affects Versions: Airflow 2.0, Airflow 1.8, Airflow 1.7.1, Airflow 1.7.0,
> Airflow 1.6.2, Airflow 1.7.1.2, Airflow 1.7.1.3
> Environment: Airflow Environment:
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.5 LTS
> Release: 14.04
> Codename: trusty
> Backend:
> SQL Server 2012 SP3
> Reporter: Chad T Henderson
>
> When trying to run initdb for a MS-SQL 2012 backend, my the alembic
> migrations freeze almost immediately.
> After querying the database for blocking queries, I discovered that this
> query:
> CREATE TABLE alembic_version (
> version_num VARCHAR(32) NOT NULL
> )
>
> was blocking this query.
> SELECT [INFORMATION_SCHEMA].[TABLES].[TABLE_NAME]
> FROM [INFORMATION_SCHEMA].[TABLES]
> WHERE [INFORMATION_SCHEMA].[TABLES].[TABLE_SCHEMA] = CAST('dbo' AS
> NVARCHAR(max)) AND [INFORMATION_SCHEMA].[TABLES].[TABLE_TYPE] = 'BASE TABLE'
> ORDER BY [INFORMATION_SCHEMA].[TABLES].[TABLE_NAME]
> I attempted to let the migrations run for ~45 minutes (multiple times) and it
> did not appear that the blocking was going to resolve itself.
> Each query was running under a separate session, which is what I believe is
> the cause of the blocking.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)