goyaladitay11 commented on PR #74050:
URL: https://github.com/apache/airflow/pull/74050#issuecomment-5947943524

   Hi @kaxil , thank you for the feedback. I've addressed all four points and 
pushed an updated commit:
   
   1. **Scheduler Loop:** Wrapped DAG run creation in `_create_dag_runs` with 
`with session.begin_nested():` so any DB failure triggers a savepoint rollback 
instead of aborting the outer transaction.
   2. **PostgreSQL Aborted Transaction Handling:** Savepoints (`SAVEPOINT` / 
`ROLLBACK TO SAVEPOINT`) prevent PostgreSQL's `InFailedSqlTransaction` state 
from blocking subsequent DAG runs in the batch.
   3. **End-to-End Regression Test:** Added 
`test_create_dag_runs_db_error_does_not_abort_subsequent_dags` in 
`test_scheduler_job.py` verifying that when DAG 1 encounters a DB error inside 
`prohibit_commit`, DAG 2 creates its DAG run and the batch commits successfully.
   4. **Formatting:** Corrected the indentation in 
`CommitProhibitorGuard._validate_commit` to standard 4-space increments for 
`ruff-format`.
   
   Could you please reopen this PR for review?


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