github-actions[bot] opened a new pull request, #74918:
URL: https://github.com/apache/airflow/pull/74918

   DynamicRegion.get_or_create_many() uses a SAVEPOINT (session.begin_nested())
   to safely insert dynamic-mapping regions. Releasing that SAVEPOINT dispatches
   the same before_commit event as a real commit, and the scheduler's
   CommitProhibitorGuard rejected it unconditionally, raising "UNEXPECTED
   COMMIT - THIS WILL BREAK HA LOCKS!" before the Dag run's task instances
   could be created.
   
   This only happened for a Dag run the scheduler created from its own
   schedule: the API server's Dag run creation runs outside the scheduler's
   guarded session, so the identical SAVEPOINT release there was harmless. A
   dynamically mapped task on a real (non-manually-triggered) schedule could
   therefore never run, with the same scheduling error repeating every loop.
   
   Releasing a savepoint ends neither the outer transaction nor its row locks,
   so it cannot break the HA locks this guard protects -- only the outer
   commit can, and that remains guarded.
   (cherry picked from commit f5038e678343787f676e1bb6f0923c06f4b4f4b3)
   
   Co-authored-by: Rahul Vats <[email protected]>


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