ashb commented on a change in pull request #14016:
URL: https://github.com/apache/airflow/pull/14016#discussion_r568443705
##########
File path: airflow/utils/sqlalchemy.py
##########
@@ -229,6 +232,8 @@ def commit(self):
This is the required way to commit when the guard is in scope
"""
+ if not self.session._is_clean(): # pylint: disable=protected-access
Review comment:
Not sure about this either
##########
File path: airflow/utils/sqlalchemy.py
##########
@@ -214,6 +214,9 @@ def _validate_commit(self, _):
if self.expected_commit:
self.expected_commit = False
return
+ # Don't raise error if session is clean (useful when just querying
from DB)
+ if self.session._is_clean(): # pylint: disable=protected-access
Review comment:
This can't be here - even if the session is clean, if we allow a COMMIT
the lock will be released
----------------------------------------------------------------
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]