anitakar commented on pull request #17078:
URL: https://github.com/apache/airflow/pull/17078#issuecomment-882382776


   Basically the problem was that in case of postgres and mysql lock is global 
on the db and not connected to the db connection.
   
   In case of mssql the lock is connected to the db connection, so it can not 
be closed before the lock is released.
   
   So what I did is to create separate locks whenever a method closes 
connection in its code and also passed the session and connection whenever 
possible as an argument.
   
   Tested e2e with backend mssql by running: airflow db init/upgrade/reset.
   
   upgradedb() method creates its own connection and closes it. Same for create 
connection methods.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to