dabla commented on PR #76545:
URL: https://github.com/apache/airflow/pull/76545#issuecomment-6797039058

   > Would be good if before merge some other reviewer is taking a look - this 
chanfe goes very deep in threading. For me it looks goo btu I do no have 
extensive Threading experience in Python.
   
   @jscheffl the threading review you asked for hasn't come: Ash, Amogh and 
Kaxil have had review requests since the PR was opened on 2026-11-05 (pinged 
again on 2026-11-09) without a reply.
   
   This code isn't new to review, though. I split it out of #62922 to make the 
main PR lighter, and while it was still there Kaxil reviewed the asend/channel 
threading in four threads, all addressed:
   
   
[r4237580844](https://github.com/apache/airflow/pull/62922#discussion_r4237580844):
 cancelling a coroutine parked in to_thread(_read_frame)
   
[r4247992277](https://github.com/apache/airflow/pull/62922#discussion_r4247992277):
 asend doing the whole exchange on a worker thread
   
[r4251963396](https://github.com/apache/airflow/pull/62922#discussion_r4251963396):
 an asyncio.Lock shared across event loops
   
[r4265334691](https://github.com/apache/airflow/pull/62922#discussion_r4265334691):
 the per-loop lock keeping its loop alive
   It's also not only for 
[AIP-104](https://cwiki.apache.org/confluence/spaces/AIRFLOW/pages/421954527/AIP-104+Iterable+Tasks+IT+and+Batched+Task+Mapping.+BTM).
 Async tasks on main hit the same bugs today: in an async @task that gathers 
SDK calls, a sync call such as `Connection.extra_dejson` (secret masking) 
raises `DeadlockImminentError` while an asend is in flight; an 
`asyncio.wait_for` that cancels an SDK call leaves its response on the socket 
for the next request to read; and `asyncio.run()` on a worker thread fails with 
"bound to a different event loop" while the task's loop has calls in flight.
   
   CI is green and the change is limited to `CommsDecoder` and its tests, with 
benchmarks in the description. Unless you or someone else objects, I'll merge 
on Monday 2026-11-16 on your approval. If you'd still rather wait for a second 
reviewer, say so and I'll hold.
   
   cc @kaxil @amoghrajesh @ashb


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