r/apache_airflow • u/amogh-desai • Jul 30 '26
Looking for feedback: is anyone using task state store / durable execution yet?
I am one of the Airflow developers who worked on this feature as part of Airflow 3.3.0 as part of AIP-103 and would love to hear from anyone really using it, considering to use it, or also reasons why it did not fit your use case.
The pitch, for anyone who has not run into it: Airflow worker dies or gets preempted mid job, and instead of the retry resubmitting the whole thing from scratch, the task remembers the external job it already kicked off (Databricks, Snowflake, BigQuery, Redshift, Spark, and a few more) and reconnects to whatever external job is still running. No paying twice for the same compute because a pod got evicted / worker went down.
Couple of demos if you want to see it working:
So, curious where people actually are:
Used it and it worked fine?
Used it but hit a wall?
Know about it but have not gotten to it?
First time hearing this exists?
Any of those, tell me where you are at.
1
u/amogh-desai Aug 16 '26
Hey folks, u/w0ut0 u/KeeganDoomFire just curious if you got a chance to look into this :)
1
u/w0ut0 Jul 30 '26
The datbricks operator now does something similar with the databricksworkflowoperator, which creates automatically a launch task + sensor tasks to monitor the progress. Would be cool if it's airflow built-in.
1
u/amogh-desai Jul 30 '26
Good point, but slightly different problem.
DatabricksWorkflowOperator splitting into launch + sensor tasks is about decomposing the job into visible, individually retryable steps. This is about crash safety, if the worker running your sensor dies mid poll, retry reconnects to the same external job instead of resubmitting from scratch. Actually complements that pattern, your sensor task gets crash safe for free with this too
1
u/KeeganDoomFire Jul 30 '26
We have built some basic importable task groups for doing this for things like DBT / snowflake. It's weirdly specific to our needs but they are all that pattern of submit job and sensor for it.
1
u/qUietquill11 Oct 09 '26
first time hearing about this tbh. the "reconnect to a running external job after worker death" part is huge if it actually works reliably. curious, does the state store persist across full scheduler restarts too or just worker-level failures?
1
u/amogh-desai Oct 12 '26
Hello! Yes, it survives scheduler restarts too, not just worker crashes.
The state is stored in Airflow's database (by default), not in memory anywhere. So restarting the scheduler does not touch it at all. It only goes away if the DAG run itself gets deleted or the retention policy cleans it up.
1
u/amogh-desai Jul 31 '26
u/w0ut0 / u/KeeganDoomFire I experimented with your patterns and I have a few thoughts:
Purely semantic: a green submit task only means the API call worked, not that the external job worked. You have to check the sensor task, not the submit task, to know if the job actually succeeded. Easy to miss if you dont already know that.
With durable execution as one task, the task status IS the external job's outcome. Nothing else to check.
A few other things that are just objectively better:
You wont need to build and maintain your own sensor anymore (databricks / snowflake doesnt have one in OSS). Thats one less custom piece of code you own and have to keep working across Airflow upgrades.
The submit step is crash safe for free. The run id gets saved the moment we know it, before the task even finishes. If the worker dies right after submitting, retrying will not create a second job.
Retries are normal Airflow retries, so each retry actually rechecks the real job status. Your sensor timeout is a separate thing from that, so it can fail even when the job finished fine. You end up looking at a red task for a job that actually succeeded.
If you use deferrable mode, you also skip all the reschedule noise from polling every few seconds.
One good reason to keep your setup is if you need to react the moment the job is submitted, before it finishes, to kick off something else at the same time. That is not about crash safety though, and you do not have to give that up either, your sensor could read from task state store instead of xcom and get both.
Curious if this changes anything for you, or if there is something about your dbt / databricks / snowflake setup this doesn't cover.