-
Apache Airflow version2.6.2 What happenedI am testing dags on local airflow with default sqlite db. After upgrade airflow version to 2.6.2 from 2.2.4, I encountered I inspected code, then I found that session is not released after delete Lines 886 to 893 in 5a0494f After I added The problem occurs with our production dag codes, not reproduced with simple example dag codes. And, also here has same db lock problem. Lines 1022 to 1043 in 624cf7f Likewise, Adding What you think should happen insteadNo response How to reproduceOnly reproduced with sqlite db. Operating SystemMacOS (Apple Silicon) Versions of Apache Airflow ProvidersNo response DeploymentVirtualenv installation Deployment detailsNo response Anything elseNo response Are you willing to submit PR?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
First of all Secondly - the _reserilalize_dag is only used in "upgradedb" that is closing session (via @provide_session decorator - and it's precisely as plannec to not close sessons. One of the main reasons of "development" status is that Sqlite cannot work when you have two concurrent accesses to the sqlite file, this creates a lock - which is likely what you observed. you likley had another airflow process still running and accessing the database while you were running upgrade - this is likely why you saw the lock happen. Don't do it. Don't use sqlite for anything else than local unit testing and quick start, you will have all kinds of similar problems like that what you do. Converted to discussion in case more of it is needed. |
Beta Was this translation helpful? Give feedback.
-
This is definitely a bug in the And those of us using Airflow during development really do not appreciate being told "don't use it for production" -- yes, we know that already. |
Beta Was this translation helpful? Give feedback.
First of all
sqlitedb
should only be used for local unit testing and quick start (see the documetation where we clearly warn against using it for anything else)Secondly - the _reserilalize_dag is only used in "upgradedb" that is closing session (via @provide_session decorator - and it's precisely as plannec to not close sessons.
One of the main reasons of "development" status is that Sqlite cannot work when you have two concurrent accesses to the sqlite file, this creates a lock - which is likely what you observed. you likley had another airflow process still running and accessing the database while you were running upgrade - this is likely why you saw the lock happen. Don't do it. Don't…