potiuk commented on PR #60166:
URL: https://github.com/apache/airflow/pull/60166#issuecomment-3715225037

   I guess there is not a big number of people who use MySQL on Airflow 3 and 
have stale assets. I think it would be great to see the exact deadlock you 
experienced (including the server side information) - here or creating a 
related issue, that would allow to reason about it, and see if there are other 
related issue. 
   
   MySQL in general is much more prone to deadlocks - because often (depending 
on the plan it will use for a query, depending on the key collisions generated 
by the query and likely some other magic). In short - yes MySQLmight choose to 
open unnecessary locks sometimes. We saw that all the time happening in various 
versions of MySQL, pretty randomly and occasionally and the solution has always 
been "try to guess which way will not cause the MySQL design flaws to show up").
   
   This is basically a flaw in the way how InnoDB engine is designed and there 
are multiple issues in MySQL issue tracking around that - most of them closed 
by MySQL team as "not a bug" - claiming that the application should do "better 
queries" - i.e copying the famous Apple's "you are holding your phone in a 
wrong way" - examples https://bugs.mysql.com/bug.php?id=68021 and more recently 
https://bugs.mysql.com/bug.php?id=116815 - so yes it's quite likely there is a 
combination of things that make it manifest in your case where others might not 
experience it, or experience it far less frequently.
   
   And you likely found the right way of "holding the phone" for MySQL.
   
   BTW. Postgres is much better in optimising those out - and we heartily 
recommend Postgres instead of MySQL.


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