jason810496 opened a new pull request, #64888:
URL: https://github.com/apache/airflow/pull/64888

   ## Why
   
   SQLAlchemy 2.0+ uses `QueuePool` by default for file-based SQLite databases, 
but Airflow unconditionally skips all pool configuration (`pool_size`, 
`max_overflow`, `pool_recycle`, `pool_pre_ping`) for any SQLite connection — a 
guard that was only correct for SQLAlchemy 1.x.
   
   ## What
   
   - Remove the blanket `not SQL_ALCHEMY_CONN.startswith("sqlite")` guard in 
`prepare_engine_args` and replace it with a targeted check that only skips pool 
settings for in-memory SQLite (`sqlite://`, `sqlite:///:memory:`), which uses 
`SingletonThreadPool` that doesn't support `max_overflow`.
   - File-based SQLite now receives the same pool configuration as PostgreSQL 
and MySQL.
   - Update the SQLAlchemy docs link from 1.4 to 2.0.
   - Add unit tests covering both cases:
     - File-based SQLite gets pool settings through `configure_orm`.
     - In-memory SQLite skips pool settings (tested via `prepare_engine_args` 
directly, since `configure_orm` rejects `sqlite:///:memory:` as a relative path 
before reaching pool logic).


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