You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/23 11:24:08 UTC

[GitHub] [airflow] ashb edited a comment on pull request #18453: Remove redundant ``session.commit()`` in migration

ashb edited a comment on pull request #18453:
URL: https://github.com/apache/airflow/pull/18453#issuecomment-925722735


   Given the next statement is return, and thus that active Session will be closed, the commit here is entirely redundant -- the session will be cleaned up and any the transactions will be rolledback.
   
   So what this will actually do is:
   
   `COMMIT` (from the `commit()`)
   `BEGIN` (because session.autocommit is `False` so there is _always_` an active transaction as long as there is a session in scope)
   `ROLLBACK` (because the session goes out of scope, gets gc'd and closed.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org