alippai commented on pull request #15714: URL: https://github.com/apache/airflow/pull/15714#issuecomment-841812428
I think what you wrote is correct, but this change is a little bit different. What you describe would be achieved by starting a new transaction with the selected isolation level, using exclusive locks, submitting COMMIT between them or killing one of the transactions in the deadlocked HA case (if that's really a concurrency issue). The change in this PR affects all the Airflow operations. It might be a working workaround if the transactions are not committed / rolled back in a timely manner, but I'm not sure that avoiding deadlocks by undocumented implicit assumptions on how the different parties use _all the tables_ is the right one. Explicit exclusive locks on the problematic transactions tend to be more maintainable (unless we see major performance degradation) The issue above doesn't happen with INSERTs, however I'd assume INSERTs are happening to the same table from different scheduler instances (or UI / API) and this change may have a side-effect for those. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
