# What happens when a workflow restarts after a worker crash

**URL:** <https://community.temporal.io/t/what-happens-when-a-workflow-restarts-after-a-worker-crash/11651>\
**Category:** Community Support\
**Tags:** go-sdk, general-impl\
**Created:** [April 7, 2024, 7:28pm UTC](https://community.temporal.io/t/what-happens-when-a-workflow-restarts-after-a-worker-crash/11651 "2024-04-07T19:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parvathy\_Geetha](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/parvathy_geetha/32/4488_2.png) [@Parvathy\_Geetha](https://community.temporal.io/u/Parvathy_Geetha)\
**Post date:** [April 7, 2024, 7:28pm UTC](https://community.temporal.io/t/what-happens-when-a-workflow-restarts-after-a-worker-crash/11651/1 "2024-04-07T19:28:39Z")

</div>

Activity 1 - fetches something from a server

Say i have a workflow that does the following

1. Workflow executes Activity 1 which calls an external server and fetches some info in a local variable
2. Workflow generates ID for the child workflow based on returned info from external server in 1
3. Workflow executes Activity 2 which reports the workflow IDs created above to the external server
4. Workflow executes child workflows for all the IDs generated in 2.

Say worker crashes after step 3 - would the workflow be re-run from the beginning or restart at 4, spawning only the child workflow based on the IDs generated in 2?

I saw [a post](https://community.temporal.io/t/how-do-retries-crashes-affect-a-long-running-polling-activity-and-a-workflow/2992) about how workflows maintain the local variable states, but what if the Activity 1 in step 1 returns a different set if values once step 2 have been executed, would the value returned by activity 1 persist on re-run?

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [April 7, 2024, 9:21pm UTC](https://community.temporal.io/t/what-happens-when-a-workflow-restarts-after-a-worker-crash/11651/2 "2024-04-07T21:21:13Z")

</div>

The workflow doesn’t “restart”; it keeps running as if the worker crash had never happened. Activities are not reexecuted after they return results to the service.
