boqiang commented on PR #74761: URL: https://github.com/apache/airflow/pull/74761#issuecomment-6208964073
Thanks for catching the `StaleDataError` gap. Confirmed with a real failed ORM flush, and addressed in https://github.com/apache/airflow/commit/a53b3bc1d0682f3b0c03c52bad26df75cc982ae4. Both handlers now propagate `(DBAPIError, StaleDataError)`, matching the existing retry boundary. The expanded regression uses a pending Pool UPDATE whose row has been deleted through the raw connection, so SQLAlchemy itself raises `StaleDataError` and invalidates the Session. It covers both interception points, transient recovery and retry exhaustion, the original exception identity, bounded retries, and restoration of the Pool data after rollback. With only the production handlers restored to their pre-review version, all four new cases fail with `PendingRollbackError` after the original `StaleDataError`. With the fix, the expanded cases pass on SQLite and PostgreSQL (8 passed, 2 MySQL-only cases skipped on each). The complete MySQL 8.4 scheduler test file passes: 570 passed, 2 skipped, including both native InnoDB deadlock/autoflush cases. Ruff, airflow-core mypy, and fast/manual prek checks also pass. `CommitProhibitorGuard` and the retry policy are unchanged. The PR description now includes these results and keeps the persistent-failure isolation and multi-scheduler validation limits explicit. -- 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]
