This topic was automatically generated from Slack. You can find the original thread here.
Do Pipedream Data Stores have support for transactions or atomic operations? I have a key that I’m using as a counter that I’d like to increment but I’m worried that I’ll introduce a race condition. I don’t want to limit my worker count to 1, as that’s not really a solution to ensuring the operation is atomic. Surely there’s a way to read and update a record atomically in one workflow step.
Also something that you might want to warn people about. I’d imagine a lot of people will run into this as they don’t even know what a race condition is.
By that logic, I’d expect a step for “transaction” and maybe some useful steps like increment or decrement… but I’m sure there are a ton of ways this could be done.
My goal is to count the number of times a workflow runs in a recurring time period, which would also be a nice to have directly from pipedream metadata
Maybe my mental model is wrong, I was thinking of Data Stores like key value, where an “append” operation doesn’t have a race condition because it doesn’t require a read then write.