RehanAhmad25 commented on PR #77736:
URL: https://github.com/apache/airflow/pull/77736#issuecomment-7251669779

   <html><head></head><body><p>Did a self-review pass and pushed a few fixes in 
669c61f3db:</p>
   <ul>
   <li>The timeout restore no longer hides the original DB error when the query 
fails. On Postgres the failed query has already aborted the transaction, so the 
restore failed too and replaced the real error (e.g. the statement timeout 
itself). The restore is still attempted, but a failure there is swallowed so 
the original exception propagates. On Postgres the setting is transaction-local 
and goes away with the rollback; on MySQL the restore still runs normally, 
since <code>max_execution_time</code> stays on the pooled connection.</li>
   <li>A tiny positive <code>regexp_query_timeout</code> (e.g. 
<code>0.0004</code>) no longer rounds down to 0 ms, which would disable the 
timeout on both backends. It's clamped to 1 ms now.</li>
   <li>The sync <code>apply_regex_query_timeout</code> had the same two issues, 
so I fixed both helpers the same way. Happy to split the sync change into its 
own PR if you'd prefer.</li>
   <li>Renamed <code>aregex_param_factory</code> to 
<code>regex_param_factory_async</code> to match the <code>_async</code> naming 
used elsewhere (<code>create_session_async</code>, 
<code>get_query_count_async</code>, <code>paginated_select_async</code>).</li>
   <li>Tightened the tests: the session test now keys statements by the session 
object instead of <code>id()</code> (so a closed session's id can't be reused 
by the next one), and checks the timeout is set before the 
<code>asset_event</code> query and restored after it. Added unit tests for the 
failed-restore and sub-ms cases.</li>
   </ul>
   <p>Re-tested:</p>
   
   Backend | Driver | Result
   -- | -- | --
   SQLite | sqlite+aiosqlite | 457 passed, 4 skipped
   PostgreSQL 14 | psycopg_async | 461 passed
   MySQL 8.0 | asyncmy | 461 passed
   
   
   <p><code>test_event_loop_blocking.py</code>: 4 passed, 22 xfailed (same as 
before, all pre-existing).</p></body></html>


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