Record is locked by the scenario

Hey, I have a few scenarios that all update a Make Data Store.

I have a scenario that loads records into a data store. Then waits 2mins, then triggers 3 other scenarios via webhooks.

The later scenarios load the data store, and process the data, then update it as ‘done’

Recently, a few of the scenarios succeed, but with a warning that the data store update didn’t happen, because "Record is locked by [the first scenario]’

The first scenario should have happened about 2 minutes before this one, so not sure why it would still have the records locked.

I’ve also had runs fail and stop the scenario altogether because of the locked record.

Question is - why would it be locked?
And, how can I ensure this doesn’t happen again?
Would it be better to use google sheets or something instead?

Hey @Evan_Cowan,

In your first scenario, it calls 3 other scenarios via webhooks.
I believe that the first scenario is going to wait for a response from calling webhooks.
By default, that response comes back when the scenario you called ends (or a default response after about 40 seconds).
You might try adding a webhook response very early in the process in the 3 other scenarios so that the initial scenario ends and hopefully releases the data store records.

I want to say that while a scenario is actively running and it involves database transactions like this, they don’t get committed until the scenario ends successfully, and if the scenario ends in failure it may cancel or rollback those pending changes.

This page describes the process.

4 Likes

thanks @Donald_Mitchell , I’ll give that a go