kaxil commented on a change in pull request #14016:
URL: https://github.com/apache/airflow/pull/14016#discussion_r568280948
##########
File path: airflow/utils/session.py
##########
@@ -29,7 +29,9 @@ def create_session():
session = settings.Session()
try:
yield session
- session.commit()
+ # Only Commit is a new or a modified object exists in the session
+ if not session._is_clean(): # pylint: disable=protected-access
Review comment:
Both the file changes are not strictly needed. Either of the two file
changes are sufficient.
In one cases we commit an empty session and in other case we don't commit a
session if it is empty.
----------------------------------------------------------------
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]