jason810496 opened a new pull request, #72127: URL: https://github.com/apache/airflow/pull/72127
- related: #68232 - related: #68214 ## Why While reviewing https://github.com/apache/airflow/pull/71135 and https://github.com/apache/airflow/pull/71387, I realized that we should support the async methods for `AssetStateStoreAccessor` following the pattern of `TaskStateStoreAccessor` introduced in #68232. ## How - Split each sync method into a `_build_*_message` helper plus a shared `_extract_get_response`, then have the sync method `send()` and the new async method `await asend()` the same message. No behaviour change on the sync path. - `adelete`/`aclear` await `BaseStoreBackend.adelete`/`aclear`, which already exist on the backend base class, and keep the DB-ref-first ordering of their sync counterparts. - Mirror the four methods on the `AssetStateStoreAccessors` facade. That is the object `TriggerRunner` injects as `trigger_instance.asset_state_store`, so it is what watcher triggers actually call. ## Known gaps (inherited from #68232, not addressed here) Both apply equally to the merged `TaskStateStoreAccessor` async methods, so they are better fixed once across the whole async-accessor family than in this PR: - `BaseStoreBackend` has no async `serialize`/`deserialize` variant, so `aget`/`aset` still call the sync ref (de)serialization on the event-loop thread. With a real-I/O worker backend that can stall the loop despite the async API. - `adelete`/`aclear` delete the DB ref first, then await `backend.adelete`/`aclear`, which `providers/common/io` still raises `NotImplementedError` for. The sync path has the same ordering, but the async backend methods are not implemented anywhere yet. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Opus 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]
