cloudflare / cloudflare/workers-rs
[Feature] All-or-nothing multi-put operation for R2 bucket
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Description
I have an application whose state contains two variables, A and B. Both are stored in R2 at different keys. For my use case, it is necessary that every time I write a new value of A, I also write a new value of B. The application would be in an illegal state if only one variable were updated without the other.
Currently, there isn't a way for me to `put` two values in a [Bucket](https://docs.rs/worker/0.6.7/worker/struct.Bucket.html) such that either a) both values are successfully written, or b) both values fail to write.
An all-or-nothing multi-put feature would be very helpful. Another way to view this is as a small subset of a transactions API.
cc @guybedford
Contributor guide
Assessment
This issue has not been assessed yet.