kaxil commented on code in PR #65231:
URL: https://github.com/apache/airflow/pull/65231#discussion_r3081094986


##########
airflow-core/src/airflow/utils/db.py:
##########
@@ -1204,6 +1204,12 @@ def _run_upgradedb(
         with _configured_alembic_environment() as env:
             source_heads = env.script.get_heads()
 
+        # End the read-only transaction from _get_current_revision before
+        # external DB manager migrations, which may run DDL that is blocked by
+        # open transactions (e.g. CREATE INDEX CONCURRENTLY). The advisory lock
+        # is unaffected: it is session-level and held on a separate connection.
+        work_session.rollback()
+

Review Comment:
   Nit: might be worth mentioning `create_global_lock()` by name here so 
readers don't have to hunt for where the separate connection lives.



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