Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firestore batch write rollback?

Since transactions are limited in Firestore, sometimes you are stuck performing multiple batch writes, or batch writes that are contingent on other network events. In such a case, if one write succeeds and another fails, is there any way to perform a rollback on the batch that was completed?

like image 377
GoldenJoe Avatar asked Feb 20 '26 14:02

GoldenJoe


1 Answers

Firestore does not have a rollback option for batch writes (or transactions) that have already succeeded. If you need to undo a batch write, your application will need to remember the changes that were made in a batch and revert them manually.

like image 63
Doug Stevenson Avatar answered Feb 23 '26 11:02

Doug Stevenson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!