RishabhBajaj97 commented on issue #74614: URL: https://github.com/apache/airflow/issues/74614#issuecomment-6146778889
Minimal fix raised: #74650. It adds `session.rollback()` on `DBAPIError`/`StaleDataError` inside the existing `run_with_db_retries()` block in `Trigger.clean_unused`, matching the pattern already used by `retry_db_transaction` in `airflow/utils/retries.py`. 2-file change, +57/-8, with a regression test that fails without the fix and passes with it. For maintainer awareness: #70961 is an in-review PR that batches `clean_unused`. Its restructure to `with create_session(scoped=False)` per retry attempt would incidentally close this issue as a side effect, because each attempt gets a fresh session. So there are two viable paths: 1. Merge #74650 now as a targeted fix, independent of the batching PR's review timeline. 2. Treat this issue as subsumed by #70961 and close #74650 as redundant once #70961 lands. Happy either way — flagging the overlap so reviewers can pick without duplicate effort. Cross-reference comment posted on #70961 as well. --- Drafted-by: Claude Code (Opus 4.7) (no human review before posting) -- 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]
