Add async task store accessors for async tasks#68232
Conversation
d61e93b to
6b41fdd
Compare
|
It would be good if @ashb or @amoghrajesh could validate this PR. |
|
I do not have b/w as of today, but I would wanna take a look at this one tomorrow. |
7460b4d to
a51d715
Compare
7fbc338 to
6251981
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
The async boundary is at the task-supervisor socket. The supervisor is a separate OS process entirely and whatever it does (sync HTTP, sync DB) is irrelevant to the task event loop. The task just awaits the socket response via asyncio.to_thread, which parks in a thread pool without blocking the event loop.
The description says that "wiring the execution API routes to the async DB path via MetastoreStateStoreBackend.aset" is genuinely not what this PR does, and more importantly, it does not need to do that. The fix is complete at the socket layer.
You will have to edit that to avoid confusion and requesting changes to avoid accidental merge with missing adelete / aclear now.
|
Good catch, just added adelete and aclear so an async task can clean up without falling back to the blocking sync calls. |
71d2ffe to
47134bb
Compare
|
Hi @amoghrajesh gentle ping. PTAL, thanks! |
47134bb to
6a8644b
Compare
|
Hi @amoghrajesh gentle ping. PTAL, thanks! |
jason810496
left a comment
There was a problem hiding this comment.
Would you mind to resolve the conflict when you have a moment? Thanks.
52901b0 to
2e3b501
Compare
2e3b501 to
1864bb2
Compare
|
Hi @amoghrajesh could you help take another look, thanks! |
|
@guan404ming hello, I will take a look today |
amoghrajesh
left a comment
There was a problem hiding this comment.
Looks much better now, last set of comments, otherwise looks good.
1864bb2 to
8c3f1dc
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
LGTM. @kaxil wanna take another look?
|
Thanks @amoghrajesh ! |
bd82974 to
c9c382f
Compare
Signed-off-by: Guan-Ming (Wesley) Chiu <[email protected]>
Signed-off-by: Guan-Ming (Wesley) Chiu <[email protected]>
c9c382f to
7e8440b
Compare
Related Issue
closes #68214
Why
Async
@taskfunctions could not checkpoint to task state store because the existing get/set/delete/clear block the event loop.How
Was generative AI tooling used to co-author this PR?
Claude Code with Claude Opus 4.8
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.