desusaiteja opened a new pull request, #71354: URL: https://github.com/apache/airflow/pull/71354
The asset state store only offers synchronous get/set/delete/clear. These block the event loop on every supervisor round-trip, which stalls other coroutines in async tasks and, for watcher triggers, every other trigger sharing the triggerer loop. The watcher trigger example in the docs was itself calling the blocking accessors inside async def run(). #68232 solved the same problem for the task state store. Instead of the direct async HTTP client path proposed in the issue, it awaits the supervisor round-trip via SUPERVISOR_COMMS.asend(), so nothing blocks the loop and no extra client wiring is needed at task startup. This PR extends that pattern to the asset state store: - aget/aset/adelete/aclear on AssetStateStoreAccessor and on the single-inlet shorthand of AssetStateStoreAccessors - adelete/aclear await the async variants on the custom backend (BaseStoreBackend.adelete/aclear), which already existed - message building and response extraction are shared between the sync and async paths, so sync behavior is unchanged - docs cover the new async accessors, and the watcher trigger example now uses aget/aset instead of blocking the triggerer loop With this and #68232, every state store accessor has a non-blocking path. The remaining idea from the issue, bypassing the supervisor with a direct async HTTP client, may not be needed given the asend() approach, so leaving that call to the maintainers. related: #66842 ##### Was generative AI tooling used to co-author this PR? - [X] Yes. Claude Code (Fable 5) Generated-by: Claude Code (Fable 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
