Transactions and batched writes | Firestore | Firebase
Cloud Firestore supports atomic operations for reading and writing data. In a set of atomic operations, either all of the operations succeed, or none of them are applied. There are two types of atomic operations in Cloud Firestore: Transactions: a transaction is a set of read and write operations on one or more documents.