PipedreamHQ / PipedreamHQ/pipedream
[FEATURE] Atomic increment key for Pipedream Data Store
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
**Is your feature request related to a problem? Please describe.**
Most data store operations do not support concurrency, because reading a value, then modifying it, and then writing it back can easily lead to race conditions across parallel workflows.
- Atomic: 1 --> `incr` --> `incr` = 3
- Non-atomic/race condition: 1 --> two workflows read 1 at the same time, increment it, and write it back = 2
**Describe the solution you'd like**
The ability to increment (or decrement) a numeric value in the Data Store. The resulting value should be returned.
**Do you have a workaround?**
Workarounds are possible, but painful & complex.
**Comparable features in other tools?**
[Redis' `incr`/`incrby` operation](https://redis.io/commands/incrby/) is reliably atomic, even under extremely high concurrency.

Contributor guide
Assessment
This issue has not been assessed yet.