Home » Automations » Example Race Condition_ Add Tag Executed But Not Added

Example Race Condition: Add Tag Executed But Not Added

In this example, we can see that the tag was added successfully to this contact in the workflow execution logs.

 

However, when we check the contact record, there is no sign of the tag.

Lets go back to the execution log and pay attention to the time. The “Add to workflow” and “Add Tag” action fired at the same time within the exact same second, which is a race condition.


How To Prevent a Race Condition

To fix the race condition, just add a Wait action of 1 minute. 

https://www.loom.com/share/f4adf9e14dab429da0cc2fedbb7e5e36

With a Wait 1 minute action, there is no chance of the race condition occurring.