COKID opened a new issue, #56949:
URL: https://github.com/apache/airflow/issues/56949

   ### Description
   
   Add option to disable “SELECT GET_LOCK('airflow_MIGRATIONS', 1800)“ when 
exec airflow db migrate 
   
   ### Use case/motivation
   
   I deploy airflow to cloud using cloud mysql. When I exec db migrate, it 
throws `sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1105, 
"slice: slice-0 execution timed out, sql: SELECT GET_LOCK('airflow_MIGRATIONS', 
1800)")` while my local mysql works well. 
   I delete the source code at airflow.utils.db.py:1364 
`conn.execute(text("SELECT GET_LOCK(:id, :timeout)"), {"id": str(lock), 
"timeout": lock_timeout})` and airflow.utils.db.py:1379 
`conn.execute(text("select RELEASE_LOCK(:id)"), {"id": str(lock)})` and exec db 
migrate at cloud server, all problems solved.
   So, if there is a possibility that airflow could add an option using to 
disable sql lock check in airflow.cfg
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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